aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-07-30 22:36:46 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:35:26 -0400
commit3f5a54e371ca20b119b73704f6c01b71295c1714 (patch)
tree1453315564a19e967f11e612e264d4d2989afbe5 /include
parent2f2c99dba2398ef7d9c21f7c793180a50e68b1f0 (diff)
ftrace: dump out ftrace buffers to console on panic
At OLS I had a lot of interest to be able to have the ftrace buffers dumped on panic. Usually one would expect to uses kexec and examine the buffers after a new kernel is loaded. But sometimes the resources do not permit kdump and kexec, so having an option to still see the sequence of events up to the crash is very advantageous. This patch adds the option to have the ftrace buffers dumped to the console in the latency_trace format on a panic. When the option is set, the default entries per CPU buffer are lowered to 16384, since the writing to the serial (if that is the console) may take an awful long time otherwise. [ Changes since -v1: Got alpine to send correctly (as well as spell check working). Removed config option. Moved the static variables into ftrace_dump itself. Gave printk a log level. ] Signed-off-by: Steven Rostedt <srostedt@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 018af16bce5c..f7fb92045bf0 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -178,6 +178,7 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
178extern int 178extern int
179__ftrace_printk(unsigned long ip, const char *fmt, ...) 179__ftrace_printk(unsigned long ip, const char *fmt, ...)
180 __attribute__ ((format (printf, 2, 3))); 180 __attribute__ ((format (printf, 2, 3)));
181extern void ftrace_dump(void);
181#else 182#else
182static inline void 183static inline void
183ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } 184ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
@@ -186,6 +187,7 @@ ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)))
186{ 187{
187 return 0; 188 return 0;
188} 189}
190static inline void ftrace_dump(void) { }
189#endif 191#endif
190 192
191#ifdef CONFIG_FTRACE_MCOUNT_RECORD 193#ifdef CONFIG_FTRACE_MCOUNT_RECORD