diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-10-03 16:11:15 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-10-03 16:13:36 -0400 |
commit | feaf0a2cccdc2977b2924fcc9ee779e80ee8c44f (patch) | |
tree | 706ef1cef4ffb944566eabc3e3833be20ac89d8d | |
parent | 013205a8f9e60998b39c106470957030585b5851 (diff) | |
download | trace-cmd-feaf0a2cccdc2977b2924fcc9ee779e80ee8c44f.tar.gz |
trace-graph: Do not show 'interrupts' if no interrupt event was added
Since showing interrupts for when events are in interrupts can cause the
task plots to be crazy if the interrupt events are not traced, do not do the
"in interrupt" notation unless interrupts were traced.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-graph.c | 6 | ||||
-rw-r--r-- | trace-graph.h | 2 | ||||
-rw-r--r-- | trace-plot-task.c | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/trace-graph.c b/trace-graph.c index 0eb74ff4..bfb0525d 100644 --- a/trace-graph.c +++ b/trace-graph.c @@ -204,6 +204,8 @@ static void init_event_cache(struct graph_info *ginfo) ginfo->soft_irq_entry_ids = NULL; ginfo->soft_irq_exit_ids = NULL; + ginfo->no_irqs = TRUE; + ginfo->event_pid_field = NULL; ginfo->event_comm_field = NULL; ginfo->ftrace_pid_field = NULL; @@ -1210,8 +1212,10 @@ trace_graph_check_irq(struct graph_info *ginfo, for (i = 0; events[i]; i++) { event = events[i]; - if (strcmp(event->system, "irq_vectors") == 0) + if (strcmp(event->system, "irq_vectors") == 0) { + ginfo->no_irqs = FALSE; break; + } } for (; events[i]; i++) { diff --git a/trace-graph.h b/trace-graph.h index bc76e50f..7e668381 100644 --- a/trace-graph.h +++ b/trace-graph.h @@ -244,6 +244,8 @@ struct graph_info { struct format_field *wakeup_new_pid_field; struct format_field *wakeup_new_success_field; + gboolean no_irqs; + gboolean read_comms; /* Read all comms on first load */ struct filter_task *task_filter; diff --git a/trace-plot-task.c b/trace-plot-task.c index 5aa0af96..d810ebba 100644 --- a/trace-plot-task.c +++ b/trace-plot-task.c @@ -338,6 +338,9 @@ static gboolean record_is_interrupt(struct graph_info *ginfo, { gboolean in_irq; + if (ginfo->no_irqs) + return FALSE; + in_irq = !!(pevent_data_flags(ginfo->pevent, record) & (TRACE_FLAG_HARDIRQ | TRACE_FLAG_SOFTIRQ)); |