diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-01-05 22:26:49 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-01-05 22:26:49 -0500 |
commit | ae5af61c2293dcea7f070a3bbb9518152d6a93af (patch) | |
tree | 4e9893a16dc44dad453824eae319ba8cee757788 | |
parent | 09db721d3fda49320d516484375d852bba856f0c (diff) |
trace-graph: Show filtered tasks scheduling out
The trace graph shows filtered tasks scheduling in, but it
filters out that task from scheduling out. This fixes that bug.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-graph.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/trace-graph.c b/trace-graph.c index 0500e35..5f1464c 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
@@ -1078,6 +1078,7 @@ static void draw_cpu(struct graph_info *ginfo, gint cpu, | |||
1078 | gint last_event_id = 0; | 1078 | gint last_event_id = 0; |
1079 | gint event_id; | 1079 | gint event_id; |
1080 | gboolean filter; | 1080 | gboolean filter; |
1081 | gboolean is_sched_switch; | ||
1081 | const char *comm; | 1082 | const char *comm; |
1082 | 1083 | ||
1083 | /* Calculate the size of 16 characters */ | 1084 | /* Calculate the size of 16 characters */ |
@@ -1118,8 +1119,10 @@ static void draw_cpu(struct graph_info *ginfo, gint cpu, | |||
1118 | 1119 | ||
1119 | x = (gint)((gdouble)ts * ginfo->resolution); | 1120 | x = (gint)((gdouble)ts * ginfo->resolution); |
1120 | 1121 | ||
1122 | is_sched_switch = FALSE; | ||
1121 | 1123 | ||
1122 | if (check_sched_switch(ginfo, record, &pid, &comm)) { | 1124 | if (check_sched_switch(ginfo, record, &pid, &comm)) { |
1125 | is_sched_switch = TRUE; | ||
1123 | if (read_comms) { | 1126 | if (read_comms) { |
1124 | /* | 1127 | /* |
1125 | * First time through, register any missing | 1128 | * First time through, register any missing |
@@ -1151,13 +1154,18 @@ static void draw_cpu(struct graph_info *ginfo, gint cpu, | |||
1151 | x - last_x, CPU_BOX_SIZE); | 1154 | x - last_x, CPU_BOX_SIZE); |
1152 | 1155 | ||
1153 | last_x = x; | 1156 | last_x = x; |
1154 | last_pid = pid; | ||
1155 | 1157 | ||
1156 | set_color_by_pid(ginfo->draw, gc, pid); | 1158 | set_color_by_pid(ginfo->draw, gc, pid); |
1157 | } | 1159 | } |
1158 | 1160 | ||
1159 | filter = graph_filter_on_task(ginfo, pid); | 1161 | filter = graph_filter_on_task(ginfo, pid); |
1160 | 1162 | ||
1163 | /* Also show the task switching out */ | ||
1164 | if (filter && is_sched_switch) | ||
1165 | filter = graph_filter_on_task(ginfo, last_pid); | ||
1166 | |||
1167 | last_pid = pid; | ||
1168 | |||
1161 | if (!filter) | 1169 | if (!filter) |
1162 | gdk_draw_line(ginfo->curr_pixmap, gc, // ginfo->draw->style->black_gc, | 1170 | gdk_draw_line(ginfo->curr_pixmap, gc, // ginfo->draw->style->black_gc, |
1163 | x, CPU_TOP(cpu), x, CPU_BOTTOM(cpu)); | 1171 | x, CPU_TOP(cpu), x, CPU_BOTTOM(cpu)); |