From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 2/4] tracing: stop stack trace on first empty entry
Date: Fri, 15 May 2009 00:05:56 -0400 [thread overview]
Message-ID: <20090515040746.676382923@goodmis.org> (raw)
In-Reply-To: 20090515040554.074680910@goodmis.org
[-- Attachment #1: 0002-tracing-stop-stack-trace-on-first-empty-entry.patch --]
[-- Type: text/plain, Size: 952 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The stack tracer stores eight entries in the ring buffer when an event
traces the stack. The output outputs all eight entries regardless of
how many entries were recorded.
This patch breaks out of the loop when a null entry is discovered.
[ Impact: only print the stack that is recorded ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_output.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 8bd9a2c..489c0e8 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -898,6 +898,8 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
trace_assign_type(field, iter->ent);
for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
+ if (!field->caller[i])
+ break;
if (i) {
if (!trace_seq_puts(s, " <= "))
goto partial;
--
1.6.2.4
--
next prev parent reply other threads:[~2009-05-15 4:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 4:05 [PATCH 0/4] [GIT PULL] tracing: small updates for tip Steven Rostedt
2009-05-15 4:05 ` [PATCH 1/4] x86/stacktrace: return 0 instead of -1 for stack ops Steven Rostedt
2009-05-15 4:05 ` Steven Rostedt [this message]
2009-05-15 4:05 ` [PATCH 3/4] tracing/filters: add missing unlock in a failure path Steven Rostedt
2009-05-15 4:05 ` [PATCH 4/4] tracing/filters: fix off-by-one bug Steven Rostedt
2009-05-15 14:25 ` [PATCH 0/4] [GIT PULL] tracing: small updates for tip Ingo Molnar
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=20090515040746.676382923@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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