aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_output.c
diff options
context:
space:
mode:
authorwalimis <walimisdev@gmail.com>2009-06-03 04:01:29 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-06-03 10:25:15 -0400
commitf11b3f4e2932bfdcfc458ab8d1ece62724ceabfc (patch)
tree7cfd2a8b955b27eea4c0d5860e9a92fdc91b8024 /kernel/trace/trace_output.c
parent083a63b48e4dd0a6a2d44216720076dc81ebb255 (diff)
tracing/events: fix output format of kernel stack
According to "events/ftrace/kernel_stack/format", output format of kernel stack should use "=>" instead of "<=". The second problem is that we shouldn't skip the first entry in the stack, although it seems to be duplicated when used in the "function" tracer, but events also use it. If we skip the first one, we will drop the topmost entry of the stack. The last problem is that if the last entry is ULONG_MAX(0xffffffff), we should drop it, otherwise it will print a NULL name line. before fix: sh-1072 [000] 26.957239: sched_process_fork: parent sh:1072 child sh:1073 sh-1072 [000] 26.957262: <= syscall_call <= sh-1072 [000] 26.957744: sched_switch: task sh:1072 [120] (R) ==> sh:1073 [120] sh-1072 [000] 26.957752: <= preempt_schedule <= wake_up_new_task <= do_fork <= sys_clone <= syscall_call <= After fix: sh-1075 [000] 39.791848: sched_process_fork: parent sh:1075 child sh:1076 sh-1075 [000] 39.791871: => sys_clone => syscall_call sh-1075 [000] 39.792713: sched_switch: task sh:1075 [120] (R) ==> sh:1076 [120] sh-1075 [000] 39.792722: => schedule => preempt_schedule => wake_up_new_task => do_fork => sys_clone => syscall_call Signed-off-by: walimis <walimisdev@gmail.com> LKML-Reference: <1244016090-7814-2-git-send-email-walimisdev@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r--kernel/trace/trace_output.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 0fe3b223f7ed..64596a571609 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -975,16 +975,16 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
975 975
976 trace_assign_type(field, iter->ent); 976 trace_assign_type(field, iter->ent);
977 977
978 if (!trace_seq_puts(s, "\n"))
979 goto partial;
978 for (i = 0; i < FTRACE_STACK_ENTRIES; i++) { 980 for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
979 if (!field->caller[i]) 981 if (!field->caller[i] || (field->caller[i] == ULONG_MAX))
980 break; 982 break;
981 if (i) { 983 if (!trace_seq_puts(s, " => "))
982 if (!trace_seq_puts(s, " <= ")) 984 goto partial;
983 goto partial;
984 985
985 if (!seq_print_ip_sym(s, field->caller[i], flags)) 986 if (!seq_print_ip_sym(s, field->caller[i], flags))
986 goto partial; 987 goto partial;
987 }
988 if (!trace_seq_puts(s, "\n")) 988 if (!trace_seq_puts(s, "\n"))
989 goto partial; 989 goto partial;
990 } 990 }