diff options
Diffstat (limited to 'trace-plot.c')
| -rw-r--r-- | trace-plot.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/trace-plot.c b/trace-plot.c index 5ba2ec1..ec76d52 100644 --- a/trace-plot.c +++ b/trace-plot.c | |||
| @@ -262,6 +262,35 @@ void trace_graph_plot_remove_cpu(struct graph_info *ginfo, | |||
| 262 | remove_hash(ginfo->cpu_hash, plot, cpu); | 262 | remove_hash(ginfo->cpu_hash, plot, cpu); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | void trace_graph_plot_add_all_recs(struct graph_info *ginfo, | ||
| 266 | struct graph_plot *plot) | ||
| 267 | { | ||
| 268 | struct plot_list *list; | ||
| 269 | |||
| 270 | list = malloc_or_die(sizeof(*list)); | ||
| 271 | list->next = ginfo->all_recs; | ||
| 272 | list->plot = plot; | ||
| 273 | |||
| 274 | ginfo->all_recs = list; | ||
| 275 | } | ||
| 276 | |||
| 277 | void trace_graph_plot_remove_all_recs(struct graph_info *ginfo, | ||
| 278 | struct graph_plot *plot) | ||
| 279 | { | ||
| 280 | struct plot_list **pplot; | ||
| 281 | struct plot_list *list; | ||
| 282 | |||
| 283 | pplot = &ginfo->all_recs; | ||
| 284 | |||
| 285 | while ((list = *pplot)) { | ||
| 286 | if (list->plot == plot) { | ||
| 287 | *pplot = list->next; | ||
| 288 | free(list); | ||
| 289 | break; | ||
| 290 | } | ||
| 291 | pplot = &list->next; | ||
| 292 | } | ||
| 293 | } | ||
| 265 | 294 | ||
| 266 | /* Plot callback helpers */ | 295 | /* Plot callback helpers */ |
| 267 | 296 | ||
| @@ -287,20 +316,16 @@ void trace_graph_plot_start(struct graph_info *ginfo, | |||
| 287 | 316 | ||
| 288 | int trace_graph_plot_event(struct graph_info *ginfo, | 317 | int trace_graph_plot_event(struct graph_info *ginfo, |
| 289 | struct graph_plot *plot, | 318 | struct graph_plot *plot, |
| 290 | gboolean *line, int *lcolor, | 319 | struct record *record, |
| 291 | unsigned long long *ltime, | 320 | struct plot_info *info) |
| 292 | gboolean *box, int *bcolor, | ||
| 293 | unsigned long long *bstart, | ||
| 294 | unsigned long long *bend) | ||
| 295 | { | 321 | { |
| 296 | *line = FALSE; | 322 | info->line = FALSE; |
| 297 | *box = FALSE; | 323 | info->box = FALSE; |
| 298 | 324 | ||
| 299 | if (!plot->cb->plot_event) | 325 | if (!plot->cb->plot_event) |
| 300 | return 0; | 326 | return 0; |
| 301 | 327 | ||
| 302 | return plot->cb->plot_event(ginfo, plot, line, lcolor, ltime, | 328 | return plot->cb->plot_event(ginfo, plot, record, info); |
| 303 | box, bcolor, bstart, bend); | ||
| 304 | } | 329 | } |
| 305 | 330 | ||
| 306 | void trace_graph_plot_end(struct graph_info *ginfo, | 331 | void trace_graph_plot_end(struct graph_info *ginfo, |
