4 * Copyright (c) 2009 Intel Coproration
6 * Auke Kok <auke-jan.h.kok@intel.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; version 2
19 #define MAXSAMPLES 8192
22 struct block_stat_struct {
23 /* /proc/vmstat pgpgin & pgpgout */
28 struct cpu_stat_sample_struct {
29 /* /proc/schedstat fields 10 & 11 (after name) */
34 struct cpu_stat_struct {
36 struct cpu_stat_sample_struct sample[MAXSAMPLES];
39 /* per process, per sample data we will log */
40 struct ps_sched_struct {
41 /* /proc/<n>/schedstat fields 1 & 2 */
49 struct ps_struct *children;
50 struct ps_struct *next;
52 /* must match - otherwise it's a new process with same PID */
62 /* index to first/last seen timestamps */
66 /* records actual start time, may be way before bootchart runs */
69 /* record human readable total cpu time */
72 /* largest PSS size found */
75 /* for drawing connection lines later */
79 struct ps_sched_struct sample[MAXSAMPLES];
83 extern double graph_start;
84 extern double log_start;
85 extern double sampletime[];
86 extern struct ps_struct *ps[]; /* ll */
87 extern struct block_stat_struct blockstat[];
88 extern struct cpu_stat_struct cpustat[];
101 extern double interval;
103 extern char output_path[PATH_MAX];
104 extern char init_path[PATH_MAX];
108 extern double gettime_ns(void);
109 extern void log_uptime(void);
110 extern void log_sample(int sample);
112 extern void svg_do(void);