mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
23332c2e9d
Fix the problem in kernel 2.6.15.1 (and early versions) that OProfile on x86_64 does not correctly collect the stack traces for kernel functions. The original code in valid_kernel_stack() in arch/i386/oprofile/backtrace.c assumes that the frame pointer (headaddr) should be greater than stack (i.e., regs). This assumption is wrong for x86_64 because NMIs in x86_64 use a seperate stack different from the kernel stack. Therefore, the variable stack now points to some location on the NMI stack, which turns out to be at a higher address than the frame pointer (headaddr) on the kernel stack. The correct comparison here should be between headaddr and regs->rsp for x86_64. Signed-off-by: Tong Li <tong.n.li@intel.com> Cc: John Levon <levon@movementarian.org> Cc: Philippe Elie <phil.el@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> |
||
---|---|---|
.. | ||
backtrace.c | ||
init.c | ||
Kconfig | ||
Makefile | ||
nmi_int.c | ||
nmi_timer_int.c | ||
op_counter.h | ||
op_model_athlon.c | ||
op_model_p4.c | ||
op_model_ppro.c | ||
op_x86_model.h |