lkml.org 
[lkml]   [2009]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:tracing/core] tracing/events: fix output format of user stack
Commit-ID:  048dc50c5e7eada19ebabbad70b7966d14283d41
Gitweb: http://git.kernel.org/tip/048dc50c5e7eada19ebabbad70b7966d14283d41
Author: walimis <walimisdev@gmail.com>
AuthorDate: Wed, 3 Jun 2009 16:01:30 +0800
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 3 Jun 2009 10:25:30 -0400

tracing/events: fix output format of user stack

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>


---
kernel/trace/trace_output.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 64596a5..8dadbbb 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -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)
@@ -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;

\
 
 \ /
  Last update: 2009-06-07 12:25    [W:0.044 / U:31.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site