4 This file is part of systemd.
6 Copyright (C) 2009-2013 Intel Corporation
9 Auke Kok <auke-jan.h.kok@intel.com>
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
32 struct block_stat_struct
{
33 /* /proc/vmstat pgpgin & pgpgout */
38 struct cpu_stat_sample_struct
{
39 /* /proc/schedstat fields 10 & 11 (after name) */
44 /* per process, per sample data we will log */
45 struct ps_sched_struct
{
46 /* /proc/<n>/schedstat fields 1 & 2 */
50 struct list_sample_data
*sampledata
;
51 struct ps_sched_struct
*next
;
52 struct ps_sched_struct
*prev
;
53 struct ps_sched_struct
*cross
; /* cross pointer */
54 struct ps_struct
*ps_new
;
57 struct list_sample_data
{
58 double runtime
[MAXCPUS
];
59 double waittime
[MAXCPUS
];
62 struct block_stat_struct blockstat
;
63 LIST_FIELDS(struct list_sample_data
, link
); /* DLL */
69 struct ps_struct
*next_ps
; /* SLL pointer */
70 struct ps_struct
*parent
; /* ppid ref */
71 struct ps_struct
*children
; /* children */
72 struct ps_struct
*next
; /* siblings */
74 /* must match - otherwise it's a new process with same PID */
85 /* pointers to first/last seen timestamps */
86 struct ps_sched_struct
*first
;
87 struct ps_sched_struct
*last
;
89 /* records actual start time, may be way before bootchart runs */
92 /* record human readable total cpu time */
95 /* largest PSS size found */
98 /* for drawing connection lines later */
102 struct ps_sched_struct
*sample
;
105 extern bool arg_relative
;
106 extern bool arg_filter
;
107 extern bool arg_show_cmdline
;
108 extern bool arg_show_cgroup
;
110 extern bool arg_entropy
;
111 extern bool arg_percpu
;
112 extern bool arg_initcall
;
113 extern int arg_samples_len
;
114 extern double arg_hz
;
115 extern double arg_scale_x
;
116 extern double arg_scale_y
;
118 extern char arg_output_path
[PATH_MAX
];
119 extern char arg_init_path
[PATH_MAX
];