diff options
Diffstat (limited to 'trace-plot-cpu.c')
| -rw-r--r-- | trace-plot-cpu.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c index 6918ae4..7fd9ecc 100644 --- a/trace-plot-cpu.c +++ b/trace-plot-cpu.c | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | struct cpu_plot_info { | 5 | struct cpu_plot_info { |
| 6 | int cpu; | 6 | int cpu; |
| 7 | struct record *record; | ||
| 8 | unsigned long long last_time; | 7 | unsigned long long last_time; |
| 9 | int last_pid; | 8 | int last_pid; |
| 10 | }; | 9 | }; |
| @@ -177,7 +176,6 @@ static void cpu_plot_start(struct graph_info *ginfo, struct graph_plot *plot, | |||
| 177 | int cpu; | 176 | int cpu; |
| 178 | 177 | ||
| 179 | cpu = cpu_info->cpu; | 178 | cpu = cpu_info->cpu; |
| 180 | cpu_info->record = NULL; | ||
| 181 | cpu_info->last_time = 0ULL; | 179 | cpu_info->last_time = 0ULL; |
| 182 | cpu_info->last_pid = -1; | 180 | cpu_info->last_pid = -1; |
| 183 | 181 | ||
| @@ -396,6 +394,13 @@ int cpu_plot_display_info(struct graph_info *ginfo, | |||
| 396 | return 1; | 394 | return 1; |
| 397 | } | 395 | } |
| 398 | 396 | ||
| 397 | void cpu_plot_destroy(struct graph_info *ginfo, struct graph_plot *plot) | ||
| 398 | { | ||
| 399 | struct cpu_plot_info *cpu_info = plot->private; | ||
| 400 | |||
| 401 | free(cpu_info); | ||
| 402 | } | ||
| 403 | |||
| 399 | static const struct plot_callbacks cpu_plot_cb = { | 404 | static const struct plot_callbacks cpu_plot_cb = { |
| 400 | .match_time = cpu_plot_match_time, | 405 | .match_time = cpu_plot_match_time, |
| 401 | .plot_event = cpu_plot_event, | 406 | .plot_event = cpu_plot_event, |
| @@ -403,6 +408,7 @@ static const struct plot_callbacks cpu_plot_cb = { | |||
| 403 | .display_last_event = cpu_plot_display_last_event, | 408 | .display_last_event = cpu_plot_display_last_event, |
| 404 | .find_record = cpu_plot_find_record, | 409 | .find_record = cpu_plot_find_record, |
| 405 | .display_info = cpu_plot_display_info, | 410 | .display_info = cpu_plot_display_info, |
| 411 | .destroy = cpu_plot_destroy | ||
| 406 | }; | 412 | }; |
| 407 | 413 | ||
| 408 | void graph_plot_init_cpus(struct graph_info *ginfo, int cpus) | 414 | void graph_plot_init_cpus(struct graph_info *ginfo, int cpus) |
