From: tip-bot for walimis <walimisdev@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, walimisdev@gmail.com,
hpa@zytor.com, mingo@redhat.com, rostedt@goodmis.org,
tglx@linutronix.de
Subject: [tip:tracing/core] tracing/events: fix output format of kernel stack
Date: Sun, 7 Jun 2009 10:21:59 GMT [thread overview]
Message-ID: <tip-f11b3f4e2932bfdcfc458ab8d1ece62724ceabfc@git.kernel.org> (raw)
In-Reply-To: <1244016090-7814-2-git-send-email-walimisdev@gmail.com>
Commit-ID: f11b3f4e2932bfdcfc458ab8d1ece62724ceabfc
Gitweb: http://git.kernel.org/tip/f11b3f4e2932bfdcfc458ab8d1ece62724ceabfc
Author: walimis <walimisdev@gmail.com>
AuthorDate: Wed, 3 Jun 2009 16:01:29 +0800
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 3 Jun 2009 10:25:15 -0400
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>
---
kernel/trace/trace_output.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 0fe3b22..64596a5 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,
trace_assign_type(field, iter->ent);
+ if (!trace_seq_puts(s, "\n"))
+ goto partial;
for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
- if (!field->caller[i])
+ if (!field->caller[i] || (field->caller[i] == ULONG_MAX))
break;
- if (i) {
- if (!trace_seq_puts(s, " <= "))
- goto partial;
+ if (!trace_seq_puts(s, " => "))
+ goto partial;
- if (!seq_print_ip_sym(s, field->caller[i], flags))
- goto partial;
- }
+ if (!seq_print_ip_sym(s, field->caller[i], flags))
+ goto partial;
if (!trace_seq_puts(s, "\n"))
goto partial;
}
next prev parent reply other threads:[~2009-06-07 10:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 8:01 [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header walimis
2009-06-03 8:01 ` [PATCH 2/3] tracing/events: fix output format of kernel stack walimis
2009-06-03 8:01 ` [PATCH 3/3] tracing/events: fix output format of user stack walimis
2009-06-03 14:23 ` Steven Rostedt
2009-06-07 10:22 ` [tip:tracing/core] " tip-bot for walimis
2009-06-03 14:23 ` [PATCH 2/3] tracing/events: fix output format of kernel stack Steven Rostedt
2009-06-07 10:21 ` tip-bot for walimis [this message]
2009-06-03 13:59 ` [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header Steven Rostedt
2009-06-07 10:21 ` [tip:tracing/core] " tip-bot for walimis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-f11b3f4e2932bfdcfc458ab8d1ece62724ceabfc@git.kernel.org \
--to=walimisdev@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox