aboutsummaryrefslogtreecommitdiffstats
path: root/trace-plot-cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-plot-cpu.c')
-rw-r--r--trace-plot-cpu.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c
new file mode 100644
index 0000000..31b88f1
--- /dev/null
+++ b/trace-plot-cpu.c
@@ -0,0 +1,14 @@
1#include "trace-graph.h"
2
3static struct plot_callbacks cpu_plot_cb;
4
5void graph_plot_init_cpus(struct graph_info *ginfo, int cpus)
6{
7 char label[100];
8 int cpu;
9
10 for (cpu = 0; cpu < cpus; cpu++) {
11 snprintf(label, 100, "CPU %d", cpu);
12 trace_graph_plot_append(ginfo, label, &cpu_plot_cb);
13 }
14}