summaryrefslogtreecommitdiff
path: root/src/bootchart/store.c
Commit message (Collapse)AuthorAge
* bootchart: add control group optionWaLyong Cho2014-04-24
|
* everywhere: always use O_CLOEXEC where it makes senseLennart Poettering2014-02-13
|
* everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering2014-02-13
|
* bootchart: Remove unneeded check for NULLStefan Beller2013-12-30
| | | | | | | | | | | | | | Directly before the changed line there is: while ((parent->next_ps && parent->pid != ps->ppid)) parent = parent->next_ps; which looks one element ahead of the list, hence we can rely on parent being non null here. If 'parent' were NULL at that while loop already, it would crash as we're dereferencing 'parent' when checking for next_ps already. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
* Fix for SIGSEGV in systemd-bootchart on short-living processesIgor Zhbanov2013-10-15
| | | | | | | | | | | The function svg_ps_bars() dereferencess NULL pointer in the line endtime = ps->last->sampledata->sampletime; because of partially initialized ps_struct (ps->last == NULL). If some process terminates between scaning /proc directory in the log_sample() function and reading additional information from /proc/PID/... files, the files couldn't be read, the loop will be continued and partially initialized structure returned.
* bootchart: remove +x permissions on .c fileZbigniew Jędrzejewski-Szmek2013-08-14
|
* bootchart: fix typos in copyright noticesJason St. John2013-06-12
| | | | "Corporation" was misspelled as "Coproration"
* Dynamically allocate bootchart logsNathaniel Chen2013-05-02
| | | | | | | 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.
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* bootchart: fix a potential buffer overrunZbigniew Jędrzejewski-Szmek2013-03-31
| | | | | | | | | | | | | | | 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.
* bootchart: properly terminate stringZbigniew Jędrzejewski-Szmek2013-03-28
| | | | | | | | | | | | systemd-199/src/bootchart/store.c:289: buffer_size_warning: Calling strncpy with a maximum size argument of 256 bytes on destination array "ps->name" of size 256 bytes might leave the destination string unterminated. ...and indeed, the string was used as NULL-terminated later on. pid_cmdline_strncpy is renamed to pid_cmdline_strscpy to commemorate the fact that it *does* properly terminate the string.
* bootchart: various superficial cleanupsLennart Poettering2013-03-11
| | | | | | | | | | | | | | | | 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
* bootchart: rename log.c to store.c to aovid confusion with src/shared/log.cLennart Poettering2013-03-11