Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-17 Thread Michael Ellerman
Christophe Leroy writes: > Le 16/08/2021 à 08:44, kajoljain a écrit : >> On 8/14/21 6:14 PM, Michael Ellerman wrote: ... >>> >>> eg. >>> >>> if (use_siar && siar_valid(regs) && siar) >>> return siar + perf_ip_adjust(regs); >>> else if (use_siar) >>> return 0;

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-17 Thread kajoljain
On 8/17/21 11:07 AM, Madhavan Srinivasan wrote: > > On 8/16/21 12:26 PM, Christophe Leroy wrote: >> >> >> Le 16/08/2021 à 08:44, kajoljain a écrit : >>> >>> >>> On 8/14/21 6:14 PM, Michael Ellerman wrote: Christophe Leroy writes: > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >>

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-16 Thread Madhavan Srinivasan
On 8/16/21 12:26 PM, Christophe Leroy wrote: Le 16/08/2021 à 08:44, kajoljain a écrit : On 8/14/21 6:14 PM, Michael Ellerman wrote: Christophe Leroy writes: Le 13/08/2021 à 10:24, Kajol Jain a écrit : Incase of random sampling, there can be scenarios where SIAR is not latching sample

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-16 Thread Christophe Leroy
Le 16/08/2021 à 08:44, kajoljain a écrit : On 8/14/21 6:14 PM, Michael Ellerman wrote: Christophe Leroy writes: Le 13/08/2021 à 10:24, Kajol Jain a écrit : Incase of random sampling, there can be scenarios where SIAR is not latching sample address and results in 0 value. Since current

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-16 Thread kajoljain
On 8/13/21 3:04 PM, Christophe Leroy wrote: > > > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >> Incase of random sampling, there can be scenarios where SIAR is not >> latching sample address and results in 0 value. Since current code >> directly returning the siar value, we could see

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-16 Thread kajoljain
On 8/14/21 6:14 PM, Michael Ellerman wrote: > Christophe Leroy writes: >> Le 13/08/2021 à 10:24, Kajol Jain a écrit : >>> Incase of random sampling, there can be scenarios where SIAR is not >>> latching sample address and results in 0 value. Since current code >>> directly returning the siar

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >> Incase of random sampling, there can be scenarios where SIAR is not >> latching sample address and results in 0 value. Since current code >> directly returning the siar value, we could see multiple instruction >> pointer

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-14 Thread Michael Ellerman
Christophe Leroy writes: > Le 13/08/2021 à 10:24, Kajol Jain a écrit : >> Incase of random sampling, there can be scenarios where SIAR is not >> latching sample address and results in 0 value. Since current code >> directly returning the siar value, we could see multiple instruction >> pointer

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-13 Thread Christophe Leroy
Le 13/08/2021 à 10:24, Kajol Jain a écrit : Incase of random sampling, there can be scenarios where SIAR is not latching sample address and results in 0 value. Since current code directly returning the siar value, we could see multiple instruction pointer values as 0 in perf report. Patch

Re: [PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-13 Thread Christophe Leroy
Le 13/08/2021 à 10:24, Kajol Jain a écrit : Incase of random sampling, there can be scenarios where SIAR is not latching sample address and results in 0 value. Since current code directly returning the siar value, we could see multiple instruction pointer values as 0 in perf report. Patch

[PATCH v2 2/2] powerpc/perf: Return regs->nip as instruction pointer value when SIAR is 0

2021-08-13 Thread Kajol Jain
Incase of random sampling, there can be scenarios where SIAR is not latching sample address and results in 0 value. Since current code directly returning the siar value, we could see multiple instruction pointer values as 0 in perf report. Patch resolves this issue by adding a ternary condition to