[PATCH 3/4] kernel-shark: Don't check for system name for sched events

From: David Sharp
Date: Wed Nov 14 2012 - 20:48:42 EST


From: Vaibhav Nagarnaik <vnagarnaik@xxxxxxxxxx>

The sched tracepoint names are unique and so there is no need to check
for the subsystem name while looking up the event ID.

This helps kernel shark display the graphs correctly for trace.dat files
generated from trace collection mechanisms that don't record the subsystem.

Google-Bug-Id: 6333917
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@xxxxxxxxxx>
Signed-off-by: David Sharp <dhsharp@xxxxxxxxxx>
---
trace-graph.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/trace-graph.c b/trace-graph.c
index 4d81219..6f72350 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -1016,7 +1016,7 @@ int trace_graph_check_sched_wakeup(struct graph_info *ginfo,
found = FALSE;

event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_wakeup");
+ NULL, "sched_wakeup");
if (event) {
found = TRUE;
ginfo->event_wakeup_id = event->id;
@@ -1026,7 +1026,7 @@ int trace_graph_check_sched_wakeup(struct graph_info *ginfo,


event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_wakeup_new");
+ NULL, "sched_wakeup_new");
if (event) {
found = TRUE;
ginfo->event_wakeup_new_id = event->id;
@@ -1086,7 +1086,7 @@ int trace_graph_check_sched_switch(struct graph_info *ginfo,

if (ginfo->event_sched_switch_id < 0) {
event = pevent_find_event_by_name(ginfo->pevent,
- "sched", "sched_switch");
+ NULL, "sched_switch");
if (!event)
return 0;

--
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/