LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ftrace: sysrq-z to dump the buffers
@ 2008-11-01 18:53 Peter Zijlstra
2008-11-01 19:12 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2008-11-01 18:53 UTC (permalink / raw)
To: Ingo Molnar, Steven Rostedt; +Cc: linux-kernel
Allows one to force an ftrace dump from sysrq
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index ce0d9da..e20d6db 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -274,6 +274,22 @@ static struct sysrq_key_op sysrq_showstate_blocked_op = {
.enable_mask = SYSRQ_ENABLE_DUMP,
};
+#ifdef CONFIG_FTRACE
+#include <linux/ftrace.h>
+
+static void sysrq_ftrace_dump(int key, struct tty_struct *tty)
+{
+ ftrace_dump();
+}
+static struct sysrq_key_op sysrq_ftrace_dump_op = {
+ .handler = sysrq_ftrace_dump,
+ .help_msg = "dumpZ-ftrace-buffer",
+ .action_msg = "Dump ftrace buffer",
+ .enable_mask = SYSRQ_ENABLE_DUMP,
+};
+#else
+#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)0)
+#endif
static void sysrq_handle_showmem(int key, struct tty_struct *tty)
{
@@ -406,7 +422,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
NULL, /* x */
/* y: May be registered on sparc64 for global register dump */
NULL, /* y */
- NULL /* z */
+ &sysrq_ftrace_dump_op, /* z */
};
/* key2index calculation, -1 on invalid index */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: sysrq-z to dump the buffers
2008-11-01 18:53 [PATCH] ftrace: sysrq-z to dump the buffers Peter Zijlstra
@ 2008-11-01 19:12 ` Steven Rostedt
2008-11-01 19:22 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2008-11-01 19:12 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel
On Sat, 1 Nov 2008, Peter Zijlstra wrote:
> Allows one to force an ftrace dump from sysrq
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Steven Rostedt <srostedt@redhat.com>
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: sysrq-z to dump the buffers
2008-11-01 19:12 ` Steven Rostedt
@ 2008-11-01 19:22 ` Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2008-11-01 19:22 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Ingo Molnar, linux-kernel
On Sat, 2008-11-01 at 15:12 -0400, Steven Rostedt wrote:
> On Sat, 1 Nov 2008, Peter Zijlstra wrote:
>
> > Allows one to force an ftrace dump from sysrq
> >
> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>
> Acked-by: Steven Rostedt <srostedt@redhat.com>
needs a s/CONFIG_FTRACE/CONFIG_TRACING/ though
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-01 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-01 18:53 [PATCH] ftrace: sysrq-z to dump the buffers Peter Zijlstra
2008-11-01 19:12 ` Steven Rostedt
2008-11-01 19:22 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).