diff options
author | Anton Blanchard <anton@samba.org> | 2010-02-07 09:44:16 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-08 21:56:06 -0500 |
commit | 66fcb1059deeae072c1bf1536a8e2613028bce3e (patch) | |
tree | 99390b75ec2b292a97fcf880e1f6752d27eb80fc /arch/powerpc/kernel/traps.c | |
parent | b926a88a7b77bc27c0e7f67166f34b854fe21ccc (diff) |
powerpc: Add last sysfs file and dump of ftrace buffer to oops printout
Add printout of last accessed sysfs file, added to x86 in
ae87221d3ce49d9de1e43756da834fd0bf05a2ad (sysfs: crash debugging)
Also add the notify_die hook that allows us to print out the ftrace
buffer on oops. This is useful in conjunction with ftrace function_graph:
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=128 NUMA pSeries
last sysfs file: /sys/class/net/tunl0/type
Dumping ftrace buffer:
...
0) | .sysrq_handle_crash() {
0) 0.476 us | .hash_page();
0) 0.488 us | .xmon_fault_handler();
0) | .bad_page_fault() {
0) | .search_exception_tables() {
0) 0.590 us | .search_module_extables();
0) 2.546 us | }
0) | .printk() {
0) | .vprintk() {
0) 0.488 us | ._raw_spin_lock();
0) 0.572 us | .emit_log_char();
Showing the function graph of a sysrq-c crash.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4588d1eb18d2..0a320dbd950a 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -146,6 +146,11 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
146 | #endif | 146 | #endif |
147 | printk("%s\n", ppc_md.name ? ppc_md.name : ""); | 147 | printk("%s\n", ppc_md.name ? ppc_md.name : ""); |
148 | 148 | ||
149 | sysfs_printk_last_file(); | ||
150 | if (notify_die(DIE_OOPS, str, regs, err, 255, | ||
151 | SIGSEGV) == NOTIFY_STOP) | ||
152 | return 1; | ||
153 | |||
149 | print_modules(); | 154 | print_modules(); |
150 | show_regs(regs); | 155 | show_regs(regs); |
151 | } else { | 156 | } else { |