]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
x86: Save stack pointer in perf live regs savings
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 2 Jul 2011 13:00:52 +0000 (15:00 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 2 Jul 2011 16:04:03 +0000 (18:04 +0200)
In order to prepare for fetching the stack pointer from the
regs when possible in dump_trace() instead of taking the
local one, save the current stack pointer in perf live regs saving.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
arch/x86/include/asm/perf_event.h

index d9d4dae305f6991efa446ec0ef4e7fad8054bdc3..094fb30817abb8ea9fb6ce475a87e1c886df90b9 100644 (file)
@@ -152,6 +152,11 @@ extern unsigned long perf_misc_flags(struct pt_regs *regs);
        (regs)->bp = caller_frame_pointer();                    \
        (regs)->cs = __KERNEL_CS;                               \
        regs->flags = 0;                                        \
+       asm volatile(                                           \
+               _ASM_MOV "%%"_ASM_SP ", %0\n"                   \
+               : "=m" ((regs)->sp)                             \
+               :: "memory"                                     \
+       );                                                      \
 }
 
 #else