summaryrefslogtreecommitdiff
path: root/src/bootchart/bootchart.c
AgeCommit message (Collapse)Author
2014-02-13everywhere: always use O_CLOEXEC where it makes senseLennart Poettering
2014-02-13everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
2013-12-24log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering
including it in the log strings
2013-12-03trivial coding style clean upsThomas Hindoe Paaboel Andersen
- Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
2013-10-14list: make our list macros a bit easier to use by not requring type spec on ↵Lennart Poettering
each invocation We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use.
2013-10-13Fix write-only use of a few variablesZbigniew Jędrzejewski-Szmek
Since the invention of read-only memory, write-only memory has been considered deprecated. Where appropriate, either make use of the value, or avoid writing it, to make it clear that it is not used.
2013-06-12bootchart: fix typos in copyright noticesJason St. John
"Corporation" was misspelled as "Coproration"
2013-05-02Dynamically allocate bootchart logsNathaniel Chen
Instead of storing bootchart sample data in arrays, this patch moves storage to linked lists so that there is no more limit on samples. This patch also fixes parsing of /proc/<pid>/smaps in kernels > 3.7.
2013-04-25conf-parser: restrict .include usageLennart Poettering
Disallow recursive .include, and make it unavailable in anything but unit files.
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-17bootchart: Fix errno usage.Auke Kok
2013-04-17Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-04-15bootchart: put the bootchart into the journal.Auke Kok
This bit of code is mostly stolen from coredump.c. We construct a simple journal message and append the bootchart file in the journal automatically. You can extract the latest bootchart from the current boot with something like: $ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART which prints it to stdout. None of the other logic is touched. The journal entry is created even if bootchart was run manually, which is probably wrong.
2013-04-10Use initalization instead of explicit zeroing in more placesZbigniew Jędrzejewski-Szmek
2013-03-31bootchart: fix a potential buffer overrunZbigniew Jędrzejewski-Szmek
If the configured number of samples was close to MAXSAMPLES, the samples buffer could be overrun: - by 1, because of off-by-one in the condition (samples > arg_samples_len), and - by many in case of an overrun, because the number of samples to capture was increased, instead of being decreased. Simplify things by converting to a normal for-loop. In store.c: change buffer size from 4095 to 4096. 4095 is a strange number.
2013-03-31bootchart: split out option parsing from main()Zbigniew Jędrzejewski-Szmek
2013-03-11bootchart: bump RLIMIT_NOFILE only after we forked us off, so that the init ↵Lennart Poettering
system inherits the kernel default
2013-03-11bootchart: various superficial cleanupsLennart Poettering
Let's update bootchar to share the coding style a bit more with the rest of the package. - Some tabs/spaces fixes - add #pragma to header - split up header so that we have a 1:1 relation between .c and .h files like everywhere else - Prefix user command line arguments/configuration settings with "arg_". - other coding style fixes
2013-03-07Revert "bootchart: use _cleanup_close_"Zbigniew Jędrzejewski-Szmek
This reverts commit 0ea9530d401827e299c6e04a433e69a7a2a89d80. attribute(cleanup) can only be used inside functions (*of, sysfd are leaked). Cleanup functions are only called once when exiting scope (*f is leaked twice).
2013-03-07bootchart: use _cleanup_close_Nathaniel Chen
use _cleanup_{close_,fclose_} to close streams and file descriptors
2013-03-07bootchart: document -C, --cmdline parameterHarald Hoyer
2013-03-07bootchart: rename global len to samples_lenHarald Hoyer
2013-03-07bootchart: add parameter "-C" to expand process names to the full cmdlineHarald Hoyer
2013-02-16bootchart: rename --filter to --no-filterZbigniew Jędrzejewski-Szmek
Turning off filtering with --filter is just too confusing. Config option "Filter" doesn't have to be changed, here "Filter=yes" already meant to filter.
2013-02-16bootchart: provide better error messagesZbigniew Jędrzejewski-Szmek
2013-02-16man: move bootchart README to manpage, docbooksifyZbigniew Jędrzejewski-Szmek
2013-02-14bootchart: stricter checks of cli inputThomas Hindoe Paaboel Andersen
2013-02-14bootchart: use conf-parser & CamelCase names in .confThomas Hindoe Paaboel Andersen
2013-02-14bootchart: parse /etc/os-release rather than system-releaseHarald Hoyer
Also parse it early, so that we can get it in the initramfs.
2013-02-14bootchart: more fixes for bootchart in the initramfsHarald Hoyer
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-12bootchart: make bootchart work from within the initrdHarald Hoyer
With this patch, bootchart can be started from within the initramfs via the kernel command line "rdinit=/usr/lib/systemd/systemd-bootchart" see: http://harald.fedorapeople.org/downloads/bootchart-20130207-1652.svg
2013-02-12systemd-bootchart: relicense to LGPLv2.1+Auke Kok
When we merged systemd-bootchart we omitted relicensing this to LGPL. Now that code is being used for other purposes we need to make sure the code is shareable within systemd without further problems. The original committers and contributors of bootchart before it was merged all have agreed with the relicensing.
2013-01-14bootchart: no need for memset hereLennart Poettering
2013-01-10bootchart: Convert malloc/memset to callocAuke Kok
2013-01-10bootchart: Convert !strcmp usage to streqAuke Kok
2013-01-10bootchart: tabs to spacesThomas Hindoe Paaboel Andersen
2013-01-07bootchart: merge bootchartAuke Kok
Bootchart is renamed to 'systemd-bootchart' and installed as /usr/lib/systemd/systemd-bootchart. The configuration file will reside in /etc/systemd/bootchart.conf.