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>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 11/11] tracing: Add stack dump to trace_printk if stacktrace option is set
Date: Wed, 06 Jan 2010 18:14:00 -0500 [thread overview]
Message-ID: <20100106231534.208802835@goodmis.org> (raw)
In-Reply-To: <20100106231349.107649729@goodmis.org>
[-- Attachment #1: 0011-tracing-Add-stack-dump-to-trace_printk-if-stacktrace.patch --]
[-- Type: text/plain, Size: 1311 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
If the ftrace stacktrace option is set, then add the stack dumps to
trace_printk.
Requested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index abdd333..5314c90 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1392,8 +1392,10 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
entry->fmt = fmt;
memcpy(entry->buf, trace_buf, sizeof(u32) * len);
- if (!filter_check_discard(call, entry, buffer, event))
+ if (!filter_check_discard(call, entry, buffer, event)) {
ring_buffer_unlock_commit(buffer, event);
+ ftrace_trace_stack(buffer, flags, 6, pc);
+ }
out_unlock:
arch_spin_unlock(&trace_buf_lock);
@@ -1466,8 +1468,10 @@ int trace_array_vprintk(struct trace_array *tr,
memcpy(&entry->buf, trace_buf, len);
entry->buf[len] = '\0';
- if (!filter_check_discard(call, entry, buffer, event))
+ if (!filter_check_discard(call, entry, buffer, event)) {
ring_buffer_unlock_commit(buffer, event);
+ ftrace_trace_stack(buffer, irq_flags, 6, pc);
+ }
out_unlock:
arch_spin_unlock(&trace_buf_lock);
--
1.6.5
next prev parent reply other threads:[~2010-01-06 23:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 23:13 [PATCH 0/11][GIT PULL] tracing: various updates for 2.6.34 Steven Rostedt
2010-01-06 23:13 ` [PATCH 01/11] tracing: Have __dynamic_array() define a field Steven Rostedt
2010-01-06 23:13 ` [PATCH 02/11] tracing: Add print_fmt field Steven Rostedt
2010-01-06 23:13 ` [PATCH 03/11] tracing/syscalls: Init print_fmt for syscall events Steven Rostedt
2010-01-06 23:13 ` [PATCH 04/11] tracing/kprobes: Init print_fmt for kprobe events Steven Rostedt
2010-01-06 23:13 ` [PATCH 05/11] tracing: Have syscall tracing call its own init function Steven Rostedt
2010-01-06 23:13 ` [PATCH 06/11] tracing: Use defined fields and print_fmt to print formats Steven Rostedt
2010-01-06 23:13 ` [PATCH 07/11] tracing: Remove show_format and related macros from TRACE_EVENT Steven Rostedt
2010-01-06 23:13 ` [PATCH 08/11] tracing: Consolidate protection of reader access to the ring buffer Steven Rostedt
2010-01-06 23:13 ` [PATCH 09/11] tracing: optimize recordmcount.pl for offsets-handling Steven Rostedt
2010-01-06 23:13 ` [PATCH 10/11] tracing: Use appropriate perl constructs in recordmcount.pl Steven Rostedt
2010-01-06 23:14 ` Steven Rostedt [this message]
2010-01-13 8:26 ` [PATCH 0/11][GIT PULL] tracing: various updates for 2.6.34 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=20100106231534.208802835@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 \
--cc=peterz@infradead.org \
/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
Powered by JetHome