diff options
author | Anton Blanchard <anton@samba.org> | 2012-06-26 01:04:20 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-10 19:18:46 +1000 |
commit | 6da7094810df5408e32528024cb783f920c87a2c (patch) | |
tree | 5ee5d33f21e0ae02ed371e47a471b7716291a151 /arch/powerpc/perf | |
parent | 5c093efa6f2dd07d45835be870a20ed3b05b6ef5 (diff) |
powerpc/perf: Use perf_instruction_pointer in callchains
We use SIAR or regs->nip for the instruction pointer depending on
the PMU configuration, but we always use regs->nip in the callchain.
Use perf_instruction_pointer so the backtrace is consistent.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/perf')
-rw-r--r-- | arch/powerpc/perf/callchain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c index e8a18d1cc7c9..74d1e780748b 100644 --- a/arch/powerpc/perf/callchain.c +++ b/arch/powerpc/perf/callchain.c @@ -57,7 +57,7 @@ perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs) lr = regs->link; sp = regs->gpr[1]; - perf_callchain_store(entry, regs->nip); + perf_callchain_store(entry, perf_instruction_pointer(regs)); if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD)) return; @@ -238,7 +238,7 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry, struct signal_frame_64 __user *sigframe; unsigned long __user *fp, *uregs; - next_ip = regs->nip; + next_ip = perf_instruction_pointer(regs); lr = regs->link; sp = regs->gpr[1]; perf_callchain_store(entry, next_ip); @@ -444,7 +444,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry, long level = 0; unsigned int __user *fp, *uregs; - next_ip = regs->nip; + next_ip = perf_instruction_pointer(regs); lr = regs->link; sp = regs->gpr[1]; perf_callchain_store(entry, next_ip); |