diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2011-07-02 09:00:52 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2011-07-02 12:04:03 -0400 |
commit | 9e46294dadedc0c04adcb8ce760bd2cd74f7332d (patch) | |
tree | 35d20bd33678e9ae18aeccab48f80dc64a5c6426 /arch | |
parent | af07ce3e77d3b24ab1d71fcc5833d41800f23b2b (diff) |
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')
-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); | |||
152 | (regs)->bp = caller_frame_pointer(); \ | 152 | (regs)->bp = caller_frame_pointer(); \ |
153 | (regs)->cs = __KERNEL_CS; \ | 153 | (regs)->cs = __KERNEL_CS; \ |
154 | regs->flags = 0; \ | 154 | regs->flags = 0; \ |
155 | asm volatile( \ | ||
156 | _ASM_MOV "%%"_ASM_SP ", %0\n" \ | ||
157 | : "=m" ((regs)->sp) \ | ||
158 | :: "memory" \ | ||
159 | ); \ | ||
155 | } | 160 | } |
156 | 161 | ||
157 | #else | 162 | #else |