linux-kernel-test/arch/x86
Steven Rostedt 7ee991fbc6 ftrace: print real return in dumpstack for function graph
Impact: better dumpstack output

I noticed in my crash dumps and even in the stack tracer that a
lot of functions listed in the stack trace are simply
return_to_handler which is ftrace graphs way to insert its own
call into the return of a function.

But we lose out where the actually function was called from.

This patch adds in hooks to the dumpstack mechanism that detects
this and finds the real function to print. Both are printed to
let the user know that a hook is still in place.

This does give a funny side effect in the stack tracer output:

        Depth   Size      Location    (80 entries)
        -----   ----      --------
  0)     4144      48   save_stack_trace+0x2f/0x4d
  1)     4096     128   ftrace_call+0x5/0x2b
  2)     3968      16   mempool_alloc_slab+0x16/0x18
  3)     3952     384   return_to_handler+0x0/0x73
  4)     3568    -240   stack_trace_call+0x11d/0x209
  5)     3808     144   return_to_handler+0x0/0x73
  6)     3664    -128   mempool_alloc+0x4d/0xfe
  7)     3792     128   return_to_handler+0x0/0x73
  8)     3664     -32   scsi_sg_alloc+0x48/0x4a [scsi_mod]

As you can see, the real functions are now negative. This is due
to them not being found inside the stack.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-03 08:56:25 +01:00
..
boot x86: use limited register constraint for setnz 2008-11-25 15:38:03 +01:00
configs x86: remove irqbalance in kernel for 32 bit 2008-10-16 16:52:52 +02:00
crypto
ia32 compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
include/asm Merge commit 'v2.6.28-rc7'; branch 'x86/dumpstack' into tracing/ftrace 2008-12-03 08:55:34 +01:00
kernel ftrace: print real return in dumpstack for function graph 2008-12-03 08:56:25 +01:00
kvm KVM: Fix pit memory leak if unable to allocate irq source id 2008-11-11 21:01:51 +02:00
lguest lguest: fix irq vectors. 2008-10-31 11:24:28 +11:00
lib Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
mach-default
mach-generic x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
mach-rdc321x
mach-voyager x86, voyager: fix smp generic helper voyager breakage 2008-11-11 12:08:53 +01:00
math-emu
mm Merge commit 'v2.6.28-rc7'; branch 'x86/dumpstack' into tracing/ftrace 2008-12-03 08:55:34 +01:00
oprofile oprofile: fix an overflow in ppro code 2008-11-17 18:47:36 +01:00
pci x86: fixup config space size of CPU functions for AMD family 11h 2008-11-26 03:53:27 +01:00
power x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set 2008-11-12 23:28:51 +01:00
vdso trace: rename unlikely profiler to branch profiler 2008-11-12 22:27:58 +01:00
video
xen Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-11-30 13:01:04 -08:00
Kconfig tracing/function-graph-tracer: support for x86-64 2008-12-02 09:47:48 +01:00
Kconfig.cpu x86, bts, ftrace: a BTS ftrace plug-in prototype 2008-11-25 17:31:13 +01:00
Kconfig.debug trace: add the MMIO-tracer to the tracer menu, cleanup 2008-10-27 14:07:26 +01:00
Makefile x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00