From a54bf34429363367d7567bfd1f0ebc5fc807f598 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 18 Jun 2010 16:18:02 -0400 Subject: trace-plot: Fix filtering of event boxes in graph The graph was using the "orig_pid" to determine if it should display the box (process running) or not. But this only worked when we had sched events available. When schedule events were enabled, this would fail the tests. Signed-off-by: Steven Rostedt --- trace-plot-cpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'trace-plot-cpu.c') diff --git a/trace-plot-cpu.c b/trace-plot-cpu.c index 1c86df8..09b1690 100644 --- a/trace-plot-cpu.c +++ b/trace-plot-cpu.c @@ -237,10 +237,12 @@ static int cpu_plot_event(struct graph_info *ginfo, cpu_info->last_pid = orig_pid; else cpu_info->last_pid = pid; - } - /* Box should always use the original pid (prev in sched_switch) */ - box_filter = trace_graph_filter_on_task(ginfo, orig_pid); + /* Box should always use the original pid (prev in sched_switch) */ + box_filter = trace_graph_filter_on_task(ginfo, orig_pid); + } else + box_filter = trace_graph_filter_on_task(ginfo, cpu_info->last_pid); + if (!box_filter && cpu_info->last_pid) { info->bcolor = hash_pid(cpu_info->last_pid); -- cgit v1.2.2