summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/perf_event.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-07-02 15:00:52 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2011-07-02 18:04:03 +0200
commit9e46294dadedc0c04adcb8ce760bd2cd74f7332d (patch)
tree35d20bd33678e9ae18aeccab48f80dc64a5c6426 /arch/x86/include/asm/perf_event.h
parentMerge branch 'tip/perf/core-2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-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.h5
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