diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2011-07-02 15:00:52 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2011-07-02 18:04:03 +0200 |
commit | 9e46294dadedc0c04adcb8ce760bd2cd74f7332d (patch) | |
tree | 35d20bd33678e9ae18aeccab48f80dc64a5c6426 /arch/x86/include/asm/perf_event.h | |
parent | Merge branch 'tip/perf/core-2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-9e46294dadedc0c04adcb8ce760bd2cd74f7332d.tar.xz linux-9e46294dadedc0c04adcb8ce760bd2cd74f7332d.zip |
x86: Save stack pointer in perf live regs savings
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>
Diffstat (limited to 'arch/x86/include/asm/perf_event.h')
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index d9d4dae305f6..094fb30817ab 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -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 |