Subject: Re: [PATCH 4/4] powerpc/perf: Use perf_instruction_pointer in callchains

From: Scott Wood <[email-masked]>
Date: Tue, 26 Jun 2012 18:04:51 -0500

On 06/26/2012 06:04 AM, Anton Blanchard wrote:
> 
> 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 <[email-masked]>
> ---
> 
> Index: linux-build/arch/powerpc/perf/callchain.c
> ===================================================================
> --- linux-build.orig/arch/powerpc/perf/callchain.c	2012-04-12 11:36:26.236223786 +1000
> +++ linux-build/arch/powerpc/perf/callchain.c	2012-06-26 12:49:28.944202712 +1000
> @@ -57,7 +57,7 @@ perf_callchain_kernel(struct perf_callch
>  
>  	lr = regs->link;
>  	sp = regs->gpr[1];
> -	perf_callchain_store(entry, regs->nip);
> +	perf_callchain_store(entry, perf_instruction_pointer(regs));

Won't this break core-fsl-emb, which doesn't define
perf_instruction_pointer()?

-Scott