Commit 02a8a256 authored by Changbin Du's avatar Changbin Du Committed by Greg Kroah-Hartman

tracing: Fix missing return symbol in function_graph output

commit 1fe4293f upstream.

The function_graph tracer does not show the interrupt return marker for the
leaf entry. On leaf entries, we see an unbalanced interrupt marker (the
interrupt was entered, but nevern left).

Before:
 1)               |  SyS_write() {
 1)               |    __fdget_pos() {
 1)   0.061 us    |      __fget_light();
 1)   0.289 us    |    }
 1)               |    vfs_write() {
 1)   0.049 us    |      rw_verify_area();
 1) + 15.424 us   |      __vfs_write();
 1)   ==========> |
 1)   6.003 us    |      smp_apic_timer_interrupt();
 1)   0.055 us    |      __fsnotify_parent();
 1)   0.073 us    |      fsnotify();
 1) + 23.665 us   |    }
 1) + 24.501 us   |  }

After:
 0)               |  SyS_write() {
 0)               |    __fdget_pos() {
 0)   0.052 us    |      __fget_light();
 0)   0.328 us    |    }
 0)               |    vfs_write() {
 0)   0.057 us    |      rw_verify_area();
 0)               |      __vfs_write() {
 0)   ==========> |
 0)   8.548 us    |      smp_apic_timer_interrupt();
 0)   <========== |
 0) + 36.507 us   |      } /* __vfs_write */
 0)   0.049 us    |      __fsnotify_parent();
 0)   0.066 us    |      fsnotify();
 0) + 50.064 us   |    }
 0) + 50.952 us   |  }

Link: http://lkml.kernel.org/r/1517413729-20411-1-git-send-email-changbin.du@intel.com

Cc: stable@vger.kernel.org
Fixes: f8b755ac ("tracing/function-graph-tracer: Output arrows signal on hardirq call/return")
Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d45ae01
...@@ -768,6 +768,7 @@ print_graph_entry_leaf(struct trace_iterator *iter, ...@@ -768,6 +768,7 @@ print_graph_entry_leaf(struct trace_iterator *iter,
struct ftrace_graph_ret *graph_ret; struct ftrace_graph_ret *graph_ret;
struct ftrace_graph_ent *call; struct ftrace_graph_ent *call;
unsigned long long duration; unsigned long long duration;
int cpu = iter->cpu;
int i; int i;
graph_ret = &ret_entry->ret; graph_ret = &ret_entry->ret;
...@@ -776,7 +777,6 @@ print_graph_entry_leaf(struct trace_iterator *iter, ...@@ -776,7 +777,6 @@ print_graph_entry_leaf(struct trace_iterator *iter,
if (data) { if (data) {
struct fgraph_cpu_data *cpu_data; struct fgraph_cpu_data *cpu_data;
int cpu = iter->cpu;
cpu_data = per_cpu_ptr(data->cpu_data, cpu); cpu_data = per_cpu_ptr(data->cpu_data, cpu);
...@@ -806,6 +806,9 @@ print_graph_entry_leaf(struct trace_iterator *iter, ...@@ -806,6 +806,9 @@ print_graph_entry_leaf(struct trace_iterator *iter,
trace_seq_printf(s, "%ps();\n", (void *)call->func); trace_seq_printf(s, "%ps();\n", (void *)call->func);
print_graph_irq(iter, graph_ret->func, TRACE_GRAPH_RET,
cpu, iter->ent->pid, flags);
return trace_handle_return(s); return trace_handle_return(s);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment