Skip to content

Commit

Permalink
tracing/events: fix output format of user stack
Browse files Browse the repository at this point in the history
According to "events/ftrace/user_stack/format", fix the output of
user stack.

before fix:

  sh-1073  [000]    31.137561:  <b7f274fe> <-  <0804e33c> <-  <080835c1>

after fix:

  sh-1072  [000]    37.039329:
 =>  <b7f8a4fe>
 =>  <0804e33c>
 =>  <080835c1>

Signed-off-by: walimis <walimisdev@gmail.com>
LKML-Reference: <1244016090-7814-3-git-send-email-walimisdev@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
walimis authored and Steven Rostedt committed Jun 3, 2009
1 parent f11b3f4 commit 048dc50
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions kernel/trace/trace_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,20 @@ seq_print_userip_objs(const struct userstack_entry *entry, struct trace_seq *s,

if (ip == ULONG_MAX || !ret)
break;
if (i && ret)
ret = trace_seq_puts(s, " <- ");
if (ret)
ret = trace_seq_puts(s, " => ");
if (!ip) {
if (ret)
ret = trace_seq_puts(s, "??");
if (ret)
ret = trace_seq_puts(s, "\n");
continue;
}
if (!ret)
break;
if (ret)
ret = seq_print_user_ip(s, mm, ip, sym_flags);
ret = trace_seq_puts(s, "\n");
}

if (mm)
Expand Down Expand Up @@ -1012,10 +1015,10 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,

trace_assign_type(field, iter->ent);

if (!seq_print_userip_objs(field, s, flags))
if (!trace_seq_putc(s, '\n'))
goto partial;

if (!trace_seq_putc(s, '\n'))
if (!seq_print_userip_objs(field, s, flags))
goto partial;

return TRACE_TYPE_HANDLED;
Expand Down

0 comments on commit 048dc50

Please sign in to comment.