aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-04-18 13:08:41 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-04-21 17:11:42 -0400
commitcecbca96da387428e220e307a9c945e37e2f4d9e (patch)
tree2edefda983658c19a8f2b38ff951a3046597a4f7 /Documentation
parentb15c7b1cee119999e9eafcd602d24a595e77adac (diff)
tracing: Dump either the oops's cpu source or all cpus buffers
The ftrace_dump_on_oops kernel parameter, sysctl and sysrq let one dump every cpu buffers when an oops or panic happens. It's nice when you have few cpus but it may take ages if have many, plus you miss the real origin of the problem in all the cpu traces. Sometimes, all you need is to dump the cpu buffer that triggered the opps, most of the time it is our main interest. This patch modifies ftrace_dump_on_oops to handle this choice. The ftrace_dump_on_oops kernel parameter, when it comes alone, has the same behaviour than before. But ftrace_dump_on_oops=orig_cpu will only dump the buffer of the cpu that oops'ed. Similarly, sysctl kernel.ftrace_dump_on_oops=1 and echo 1 > /proc/sys/kernel/ftrace_dump_on_oops keep their previous behaviour. But setting 2 jumps into cpu origin dump mode. v2: Fix double setup v3: Fix spelling issues reported by Randy Dunlap v4: Also update __ftrace_dump in the selftests Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kernel-parameters.txt6
-rw-r--r--Documentation/trace/ftrace.txt6
2 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e4cbca58536c..ab67b33300fb 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -789,8 +789,12 @@ and is between 256 and 4096 characters. It is defined in the file
789 as early as possible in order to facilitate early 789 as early as possible in order to facilitate early
790 boot debugging. 790 boot debugging.
791 791
792 ftrace_dump_on_oops 792 ftrace_dump_on_oops[=orig_cpu]
793 [FTRACE] will dump the trace buffers on oops. 793 [FTRACE] will dump the trace buffers on oops.
794 If no parameter is passed, ftrace will dump
795 buffers of all CPUs, but if you pass orig_cpu, it will
796 dump only the buffer of the CPU that triggered the
797 oops.
794 798
795 ftrace_filter=[function-list] 799 ftrace_filter=[function-list]
796 [FTRACE] Limit the functions traced by the function 800 [FTRACE] Limit the functions traced by the function
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 03485bfbd797..52011815c905 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -1337,12 +1337,14 @@ ftrace_dump_on_oops must be set. To set ftrace_dump_on_oops, one
1337can either use the sysctl function or set it via the proc system 1337can either use the sysctl function or set it via the proc system
1338interface. 1338interface.
1339 1339
1340 sysctl kernel.ftrace_dump_on_oops=1 1340 sysctl kernel.ftrace_dump_on_oops=n
1341 1341
1342or 1342or
1343 1343
1344 echo 1 > /proc/sys/kernel/ftrace_dump_on_oops 1344 echo n > /proc/sys/kernel/ftrace_dump_on_oops
1345 1345
1346If n = 1, ftrace will dump buffers of all CPUs, if n = 2 ftrace will
1347only dump the buffer of the CPU that triggered the oops.
1346 1348
1347Here's an example of such a dump after a null pointer 1349Here's an example of such a dump after a null pointer
1348dereference in a kernel module: 1350dereference in a kernel module: