diff options
author | Changbin Du <changbin.du@intel.com> | 2018-01-31 10:48:49 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-07-03 18:47:11 -0400 |
commit | 1fe4293f4b8de75824935f8d8e9a99c7fc6873da (patch) | |
tree | 560f69e81cd42a4c0fede86039b5b6f229c59916 /kernel/trace/trace_functions_graph.c | |
parent | 5ccba64a560fa6ca06008d4001f5d46ebeb34b41 (diff) |
tracing: Fix missing return symbol in function_graph output
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: f8b755ac8e0cc ("tracing/function-graph-tracer: Output arrows signal on hardirq call/return")
Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 23c0b0cb5fb9..169b3c44ee97 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -831,6 +831,7 @@ print_graph_entry_leaf(struct trace_iterator *iter, | |||
831 | struct ftrace_graph_ret *graph_ret; | 831 | struct ftrace_graph_ret *graph_ret; |
832 | struct ftrace_graph_ent *call; | 832 | struct ftrace_graph_ent *call; |
833 | unsigned long long duration; | 833 | unsigned long long duration; |
834 | int cpu = iter->cpu; | ||
834 | int i; | 835 | int i; |
835 | 836 | ||
836 | graph_ret = &ret_entry->ret; | 837 | graph_ret = &ret_entry->ret; |
@@ -839,7 +840,6 @@ print_graph_entry_leaf(struct trace_iterator *iter, | |||
839 | 840 | ||
840 | if (data) { | 841 | if (data) { |
841 | struct fgraph_cpu_data *cpu_data; | 842 | struct fgraph_cpu_data *cpu_data; |
842 | int cpu = iter->cpu; | ||
843 | 843 | ||
844 | cpu_data = per_cpu_ptr(data->cpu_data, cpu); | 844 | cpu_data = per_cpu_ptr(data->cpu_data, cpu); |
845 | 845 | ||
@@ -869,6 +869,9 @@ print_graph_entry_leaf(struct trace_iterator *iter, | |||
869 | 869 | ||
870 | trace_seq_printf(s, "%ps();\n", (void *)call->func); | 870 | trace_seq_printf(s, "%ps();\n", (void *)call->func); |
871 | 871 | ||
872 | print_graph_irq(iter, graph_ret->func, TRACE_GRAPH_RET, | ||
873 | cpu, iter->ent->pid, flags); | ||
874 | |||
872 | return trace_handle_return(s); | 875 | return trace_handle_return(s); |
873 | } | 876 | } |
874 | 877 | ||