[PATCH 1/4] perf: Utility function to fetch arch from evsel

2016-06-28 Thread Ravi Bangoria
Add Utility function to fetch 'arch' from 'evsel'. (evsel->env->arch) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/evsel.c | 7 +++ tools/perf/util/evsel.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/tools/perf/util/evsel.c b/too

[PATCH 4/4] perf annotate: Define macro for arch names

2016-06-28 Thread Ravi Bangoria
Define macro for each arch name and use them instead of using arch name as string. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tool

[PATCH 3/4] perf annotate: add powerpc support

2016-06-28 Thread Ravi Bangoria
net.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/annotate.c | 64 ++ 1 file changed, 64 insertions(+) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 36a5825..96c6610

[PATCH 2/4] perf annotate: Enable cross arch annotate

2016-06-28 Thread Ravi Bangoria
instruction defined outside of that also contains arm instructions. Apart from that, 'call__parse()' and 'move__parse()' contains #ifdef __arm__ directive. I've changed it to if (!strcmp(norm_arch, "arm")). But I've not tested this as well. Signed-off-by: Ravi Bangoria &

[PATCH 0/4] perf annotate: Enable cross arch annotate

2016-06-28 Thread Ravi Bangoria
-i perf.data.powerpc --vmlinux vmlinux.powerpc Changes in [PATCH] vs [RFC] - Removed global var 'arch__ins' and pass arch info till ins__find Naveen N. Rao (1): perf annotate: add powerpc support Ravi Bangoria (3): perf: Utility function to fetch arch perf annotate: Enable cross arch annotate p

Re: [PATCH 3/4] perf annotate: add powerpc support

2016-06-29 Thread Ravi Bangoria
Thanks David. On Tuesday 28 June 2016 09:37 PM, David Laight wrote: From: Ravi Bangoria Sent: 28 June 2016 12:37 Powerpc has long list of branch instructions and hardcoding them in table appears to be error-prone. So, add new function to find instruction instead of creating table. Signed-off

[PATCH] hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc

2016-03-02 Thread Ravi Bangoria
task'. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- arch/powerpc/kernel/hw_breakpoint.c | 3 ++- include/linux/perf_event.h | 2 ++ kernel/events/core.c| 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel

Re: [PATCH v4 0/3] perf annotate: Enable cross arch annotate

2016-07-13 Thread Ravi Bangoria
Arnaldo, Michael, I've tested this patchset on ppc64 BE and LE both. Please review this. -Ravi On Friday 08 July 2016 10:10 AM, Ravi Bangoria wrote: Perf can currently only support code navigation (branches and calls) in annotate when run on the same architecture where perf.data was recorded

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-13 Thread Ravi Bangoria
On Wednesday 13 July 2016 01:09 PM, Michael Ellerman wrote: Arnaldo Carvalho de Melo <a...@kernel.org> writes: Em Tue, Jul 12, 2016 at 07:51:46AM +0530, Ravi Bangoria escreveu: Hi Arnaldo, On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote: Ravi Bangoria <r

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-11 Thread Ravi Bangoria
Hi Arnaldo, On Friday 08 July 2016 02:01 PM, Michael Ellerman wrote: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote: I've sent v4 which enables annotate for bctr' instructions. for 'bctr', it will show down arrow(in

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-04 Thread Ravi Bangoria
Hi Michael, On Friday 01 July 2016 02:13 PM, Ravi Bangoria wrote: Thanks Michael for your suggestion. On Thursday 30 June 2016 11:51 AM, Michael Ellerman wrote: On Thu, 2016-06-30 at 11:44 +0530, Ravi Bangoria wrote: diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index

[PATCH v4 0/3] perf annotate: Enable cross arch annotate

2016-07-07 Thread Ravi Bangoria
tch that define macro for each arch name v3 link: https://lkml.org/lkml/2016/6/30/99 Naveen N. Rao (1): perf annotate: add powerpc support Ravi Bangoria (2): perf: Define macro for normalized arch names perf annotate: Enable cross arch annotate tools/perf/arch/common.c |

[PATCH v4 3/3] perf annotate: add powerpc support

2016-07-07 Thread Ravi Bangoria
nstead of creating object every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Chnages in v4: - Added support for branch instruct

[PATCH v4 2/3] perf annotate: Enable cross arch annotate

2016-07-07 Thread Ravi Bangoria
annotation work properly, all architecture instruction tables need to be included in the perf binary. And while annotating, look for instruction table where perf.data was recorded. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v4: - __maybe_unused was mis

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-07 Thread Ravi Bangoria
Hi Michael, On Wednesday 06 July 2016 03:38 PM, Michael Ellerman wrote: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: On Thursday 30 June 2016 11:51 AM, Michael Ellerman wrote: On Thu, 2016-06-30 at 11:44 +0530, Ravi Bangoria wrote: diff --git a/tools/perf/util/annotate.c b

[PATCH v4 1/3] perf: Define macro for normalized arch names

2016-07-07 Thread Ravi Bangoria
Define macro for each normalized arch name and use them instead of using arch name as string Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v4: - Moved position of patch tools/perf/arch/common.c | 36 ++-- tool

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-01 Thread Ravi Bangoria
Thanks Michael for your suggestion. On Thursday 30 June 2016 11:51 AM, Michael Ellerman wrote: On Thu, 2016-06-30 at 11:44 +0530, Ravi Bangoria wrote: diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 36a5825..b87eac7 100644 --- a/tools/perf/util/annotate.c +++ b/tools

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-01 Thread Ravi Bangoria
Hi Balbir, On Friday 01 July 2016 06:18 PM, Balbir Singh wrote: On Fri, 2016-07-01 at 14:13 +0530, Ravi Bangoria wrote: Thanks Michael for your suggestion. On Thursday 30 June 2016 11:51 AM, Michael Ellerman wrote: On Thu, 2016-06-30 at 11:44 +0530, Ravi Bangoria wrote: diff --git

Re: [PATCH v2 3/4] perf annotate: add powerpc support

2016-06-29 Thread Ravi Bangoria
Thanks Naveen, On Wednesday 29 June 2016 08:15 PM, Naveen N. Rao wrote: On 2016/06/29 04:45PM, Ravi Bangoria wrote: From: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Powerpc has long list of branch instructions and hardcoding them in table appears to be error-prone. So, add new fu

[PATCH v2 3/4] perf annotate: add powerpc support

2016-06-29 Thread Ravi Bangoria
nstead of creating object every time, first check if list already contain object for that nemonics. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v2: - Corrected few memory leaks. - Cr

[PATCH v2 4/4] perf annotate: Define macro for arch names

2016-06-29 Thread Ravi Bangoria
Define macro for each arch name and use them instead of using arch name as string. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v2: - No changes tools/perf/arch/common.c | 36 ++-- tools/perf/arch/co

[PATCH v3 0/4] perf annotate: Enable cross arch annotate

2016-06-30 Thread Ravi Bangoria
-i perf.data.powerpc --vmlinux vmlinux.powerpc Changes in v3: - Optimized patch that enables annotate on powerpc - Corrected one memory leak v2 link: https://lkml.org/lkml/2016/6/29/278 Naveen N. Rao (1): perf annotate: add powerpc support Ravi Bangoria (4): perf: Utility function to fetch arch p

[PATCH v3 1/4] perf: Utility function to fetch arch

2016-06-30 Thread Ravi Bangoria
Add Utility function to fetch arch using evsel. (evsel->env->arch) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Change in v3: - No changes tools/perf/util/evsel.c | 7 +++ tools/perf/util/evsel.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/too

[PATCH v3 2/4] perf annotate: Enable cross arch annotate

2016-06-30 Thread Ravi Bangoria
instruction defined outside of that also contains arm instructions. Apart from that, 'call__parse()' and 'move__parse()' contains #ifdef __arm__ directive. I've changed it to if (!strcmp(norm_arch, arm)). But I've not tested this as well. Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v3 3/4] perf annotate: add powerpc support

2016-06-30 Thread Ravi Bangoria
nstead of creating object every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v3: - Optimized code - Corrected one m

[PATCH v3 4/4] perf: Define macro for normalized arch names

2016-06-30 Thread Ravi Bangoria
Define macro for each normalized arch name and use them instead of using arch name as string Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v3: - No changes tools/perf/arch/common.c | 36 ++-- tools/perf/arch/co

[PATCH v2 0/4] perf annotate: Enable cross arch annotate

2016-06-29 Thread Ravi Bangoria
-i perf.data.powerpc --vmlinux vmlinux.powerpc Changes in v2: - Corrected few memory leaks. - Created Dynamic list for powerpc to optimize memory consumption Naveen N. Rao (1): perf annotate: add powerpc support Ravi Bangoria (3): perf: Utility function to fetch arch perf annotate: Enable cross a

[PATCH v2 2/4] perf annotate: Enable cross arch annotate

2016-06-29 Thread Ravi Bangoria
instruction defined outside of that also contains arm instructions. Apart from that, 'call__parse()' and 'move__parse()' contains #ifdef __arm__ directive. I've changed it to if (!strcmp(norm_arch, "arm")). But I've not tested this as well. Signed-off-by: Ravi Bangoria &

[PATCH v2 1/4] perf: Utility function to fetch arch

2016-06-29 Thread Ravi Bangoria
Add Utility function to fetch arch using evsel. (evsel->env->arch) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v2: - No changes tools/perf/util/evsel.c | 7 +++ tools/perf/util/evsel.h | 2 ++ 2 files changed, 9 insertions(+) diff --git

[PATCH v2 2/2] powerpc: emulate_step tests for load/store instructions

2017-02-14 Thread Ravi Bangoria
: PASS [0.764349] emulate_step smoke test: stvx : PASS [0.764575] emulate_step smoke test: lxvd2x : PASS [0.764788] emulate_step smoke test: stxvd2x: PASS [0.764997] emulate_step smoke test: complete. Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v2 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Reported-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <r

Re: [PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
Thanks Michael, On Tuesday 14 February 2017 03:50 PM, Michael Ellerman wrote: > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: > >> emulate_step() uses a number of underlying kernel functions that were >> initially not enabled for LE. This has been rectified s

Re: [PATCH v3 2/2] powerpc: emulate_step tests for load/store instructions

2017-02-14 Thread Ravi Bangoria
On Tuesday 14 February 2017 04:16 PM, Michael Ellerman wrote: > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: > >> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile >> index 0e649d7..ddc879d 100644 >> --- a/arch/powerpc/lib/Makefile >

[PATCH v3 2/2] powerpc: emulate_step tests for load/store instructions

2017-02-14 Thread Ravi Bangoria
: PASS [0.764349] emulate_step smoke test: stvx : PASS [0.764575] emulate_step smoke test: lxvd2x : PASS [0.764788] emulate_step smoke test: stxvd2x: PASS [0.764997] emulate_step smoke test: complete. Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v3 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Reported-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <r

Re: [PATCH v2 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
On Tuesday 14 February 2017 02:17 PM, Naveen N. Rao wrote: > On 2017/02/14 01:32PM, Ravi Bangoria wrote: >> emulate_step() uses a number of underlying kernel functions that were >> initially not enabled for LE. This has been rectified since. So, fix >> emulate_step() for LE

[PATCH v2 0/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
patch of v1 into one patch, as suggested by Naveen v1 link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg110671.html Ravi Bangoria (2): powerpc: Emulation support for load/store instructions on LE powerpc: emulate_step tests for load/store instructions arch/powerpc/include

Re: [PATCH] powerpc/xmon: Fix data-breakpoint

2017-02-14 Thread Ravi Bangoria
Hi Michael, Can you please pull this patch. Thanks, Ravi On Tuesday 22 November 2016 02:55 PM, Ravi Bangoria wrote: > Xmon data-breakpoint feature is broken. > > Whenever there is a watchpoint match occurs, hw_breakpoint_handler will > be called by do_break via notifier chai

[PATCH v3 0/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
/next. No functionality changes. v2 link: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1332638.html Ravi Bangoria (2): powerpc: Emulation support for load/store instructions on LE powerpc: emulate_step tests for load/store instructions arch/powerpc/include/asm/ppc-opcode.h

[PATCH v4 1/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Reported-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <r

[PATCH v4 2/2] powerpc: emulate_step tests for load/store instructions

2017-02-14 Thread Ravi Bangoria
: PASS [0.764349] emulate_step smoke test: stvx : PASS [0.764575] emulate_step smoke test: lxvd2x : PASS [0.764788] emulate_step smoke test: stxvd2x: PASS [0.764997] emulate_step smoke test: complete. Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v4 0/2] powerpc: Emulation support for load/store instructions on LE

2017-02-14 Thread Ravi Bangoria
() for selftest - Makefile changes v3 link: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1332686.html Ravi Bangoria (2): powerpc: Emulation support for load/store instructions on LE powerpc: emulate_step tests for load/store instructions arch/powerpc/include/asm/ppc

Re: Normal service will resume shortly ...

2017-01-17 Thread Ravi Bangoria
Hi Michael, Welcome back!! Can you please take a look at: https://lists.ozlabs.org/pipermail/linuxppc-dev/2016-November/151426.html https://lists.ozlabs.org/pipermail/linuxppc-dev/2016-November/150452.html Thanks, Ravi On Monday 16 January 2017 03:03 PM, Michael Ellerman wrote: > Hi folks, >

[PATCH v5 0/7] perf: Cross arch annotate + few miscellaneous fixes

2016-08-18 Thread Ravi Bangoria
ate: Add support for powerpc Ravi Bangoria (6): perf: Define macro for normalized arch names perf annotate: Add cross arch annotate support perf annotate: Do not ignore call instruction with indirect target perf annotate: Show raw form for jump instruction with indirect target p

[PATCH v5 7/7] perf annotate: Fix jump target outside of function address range

2016-08-18 Thread Ravi Bangoria
mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashx,%eax retq Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - New patch tools/perf/ui/browsers/annotate.c | 5 +++-- tools/perf/util/annotate.c

[PATCH v5 6/7] perf annotate: Support jump instruction with target as second operand

2016-08-18 Thread Ravi Bangoria
Current perf is not able to parse jump instruction when second operand contains target address. Arch like powerpc has such instructions. For example, 'beq cr7,10173e60'. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - New patch tools/perf/util/anno

Re: [PATCH v4 0/3] perf annotate: Enable cross arch annotate

2016-08-19 Thread Ravi Bangoria
I've sent v5 series for this. Please review it. Thanks, Ravi On Wednesday 13 July 2016 03:15 PM, Ravi Bangoria wrote: > Arnaldo, Michael, > > I've tested this patchset on ppc64 BE and LE both. Please review this. > > -Ravi > > On Friday 08 July 2016 10:10 AM, Ravi Bangor

[PATCH v5 3/7] perf annotate: Add support for powerpc

2016-08-18 Thread Ravi Bangoria
ion. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - Removed hacks for instructions like bctr and bctrl from this patch. tools/perf/util/annotate.c | 116 ++

[PATCH v5 1/7] perf: Define macro for normalized arch names

2016-08-18 Thread Ravi Bangoria
Define macro for each normalized arch name and use them instead of using arch name as string. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - No changes. tools/perf/arch/common.c | 36 ++-- tools/perf/arch/co

[PATCH v5 5/7] perf annotate: Show raw form for jump instruction with indirect target

2016-08-18 Thread Ravi Bangoria
For jump instructions that does not include target address as direct operand, use raw value for that. This is needed for certain powerpc jump instructions that use target address in a register (such as bctr, btar, ...). Suggested-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by

[PATCH v5 2/7] perf annotate: Add cross arch annotate support

2016-08-18 Thread Ravi Bangoria
was recorded. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - Replaced symbol__annotate with symbol__disassemble. tools/perf/builtin-top.c | 2 +- tools/perf/ui/browsers/annotate.c | 3 +- tools/perf/ui/gtk/annotate.c | 2 +- tools/per

[PATCH v5 4/7] perf annotate: Do not ignore call instruction with indirect target

2016-08-18 Thread Ravi Bangoria
d.au> [Suggested about 'bctrl' instruction] Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v5: - New patch, introduced to annotate all indirect call instructions. tools/perf/util/annotate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) dif

Re: [PATCH v5 2/7] perf annotate: Add cross arch annotate support

2016-08-19 Thread Ravi Bangoria
On Friday 19 August 2016 04:18 PM, Russell King - ARM Linux wrote: > On Fri, Aug 19, 2016 at 04:09:51PM +0530, Ravi Bangoria wrote: >> Thanks Russell for reviewing. >> >> On Friday 19 August 2016 01:20 PM, Russell King - ARM Linux wrote: >>> On Fri, Aug 19,

[PATCH v6 1/7] perf: Define macro for normalized arch names

2016-08-19 Thread Ravi Bangoria
Define macro for each normalized arch name and use them instead of using arch name as string. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - No change tools/perf/arch/common.c | 36 ++-- tools/perf/arch/co

[PATCH v6 7/7] perf annotate: Fix jump target outside of function address range

2016-08-19 Thread Ravi Bangoria
mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashx,%eax retq Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - No changes tools/perf/ui/browsers/annotate.c | 5 +++-- tools/perf/util/annotate.c

[PATCH v6 6/7] perf annotate: Support jump instruction with target as second operand

2016-08-19 Thread Ravi Bangoria
Current perf is not able to parse jump instruction when second operand contains target address. Arch like powerpc has such instructions. For example, 'beq cr7,10173e60'. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - No changes tools/perf/util/anno

[PATCH v6 0/7] perf: Cross arch annotate + few miscellaneous fixes

2016-08-19 Thread Ravi Bangoria
Add support for powerpc Ravi Bangoria (6): perf: Define macro for normalized arch names perf annotate: Add cross arch annotate support perf annotate: Do not ignore call instruction with indirect target perf annotate: Show raw form for jump instruction with indirect target perf annotate: Supp

[PATCH v6 5/7] perf annotate: Show raw form for jump instruction with indirect target

2016-08-19 Thread Ravi Bangoria
For jump instructions that does not include target address as direct operand, use raw value for that. This is needed for certain powerpc jump instructions that use target address in a register (such as bctr, btar, ...). Suggested-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by

[PATCH v6 2/7] perf annotate: Add cross arch annotate support

2016-08-19 Thread Ravi Bangoria
was recorded. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - Instead of adding only those instructions defined in #ifdef __arm__, add all instructions from default table to arm table. tools/perf/builtin-top.c | 2 +- tools/perf/ui/br

[PATCH v6 3/7] perf annotate: Add support for powerpc

2016-08-19 Thread Ravi Bangoria
ion. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - No change tools/perf/util/annotate.c | 116 + 1 file changed, 116 insertions(+) diff --git a/

[PATCH v6 4/7] perf annotate: Do not ignore call instruction with indirect target

2016-08-19 Thread Ravi Bangoria
d.au> [Suggested about 'bctrl' instruction] Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v6: - No change tools/perf/util/annotate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util

Re: [PATCH v5 2/7] perf annotate: Add cross arch annotate support

2016-08-19 Thread Ravi Bangoria
Thanks Russell for reviewing. On Friday 19 August 2016 01:20 PM, Russell King - ARM Linux wrote: > On Fri, Aug 19, 2016 at 10:59:01AM +0530, Ravi Bangoria wrote: >> -static struct ins instructions[] = { >> +static struct ins instructions_x86[] = { >> { .name =

Re: [PATCH v6 0/7] perf: Cross arch annotate + few miscellaneous fixes

2016-09-07 Thread Ravi Bangoria
Hello, Any update on this? -Ravi On Friday 19 August 2016 06:29 PM, Ravi Bangoria wrote: > Currently Perf annotate support code navigation (branches and calls) > only when run on the same architecture where perf.data was recorded. > But, for example, record on powerpc server and

Re: [PATCH v7 1/6] perf annotate: Add cross arch annotate support

2016-10-10 Thread Ravi Bangoria
Hi Arnaldo, Sorry for little late replies, I was off last week. Please find my comments. On Wednesday 05 October 2016 04:49 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:51PM +0530, Ravi Bangoria escreveu: >> Change current data structures and function to enable c

Re: [PATCH v7 3/6] perf annotate: Show raw form for jump instruction with indirect target

2016-10-10 Thread Ravi Bangoria
On Wednesday 05 October 2016 04:57 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:53PM +0530, Ravi Bangoria escreveu: >> For jump instructions that does not include target address as direct >> operand, use raw value for that. This is needed for certain power

Re: [PATCH v7 4/6] perf annotate: Support jump instruction with target as second operand

2016-10-10 Thread Ravi Bangoria
On Wednesday 05 October 2016 04:58 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:54PM +0530, Ravi Bangoria escreveu: >> Current perf is not able to parse jump instruction when second operand >> contains target address. Arch like powerpc has such instructions.

Re: [PATCH v7 5/6] perf annotate: Fix jump target outside of function address range

2016-10-10 Thread Ravi Bangoria
On Wednesday 05 October 2016 05:01 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:55PM +0530, Ravi Bangoria escreveu: >> If jump target is outside of function range, perf is not handling it >> correctly. Especially when target address is lesser than function s

[PATCH v7 3/6] perf annotate: Show raw form for jump instruction with indirect target

2016-09-21 Thread Ravi Bangoria
ca2c stdr2,24(r1) addis r12,r2,-1 After: ld r12,32088(r12) mtctr r12 v bctr stdr2,24(r1) addis r12,r2,-1 Suggested-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v

[PATCH v7 5/6] perf annotate: Fix jump target outside of function address range

2016-09-21 Thread Ravi Bangoria
mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashx,%eax retq Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v7: - No changes tools/perf/ui/browsers/annotate.c | 5 +++-- tools/perf/util/annotate.c

[PATCH v7 2/6] perf annotate: Add support for powerpc

2016-09-21 Thread Ravi Bangoria
ion. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v7: - Little bit change in initializing instruction list. tools/perf/util/annotate.c | 112 + 1

[PATCH v7 6/6] perf annotate: cross arch annotate support fixes for ARM

2016-09-21 Thread Ravi Bangoria
From: Kim Phillips <kim.phill...@arm.com> For ARM we remove the list that contains non-arm insns, and instead add more maintainable branch instruction regex logic. Signed-off-by: Kim Phillips <kim.phill...@arm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>

[PATCH v7 0/6] perf annotate: Cross arch support + few fixes

2016-09-21 Thread Ravi Bangoria
/19/411 Kim, I don't have arm test machine. Can you please help me to test this on arm. Kim Phillips (1): perf annotate: cross arch annotate support fixes for ARM Naveen N. Rao (1): perf annotate: Add support for powerpc Ravi Bangoria (4): perf annotate: Add cross arch annotate support p

[PATCH v7 1/6] perf annotate: Add cross arch annotate support

2016-09-21 Thread Ravi Bangoria
was recorded. Record on arm: $ ./perf record -a Report -> Annotate on x86: $ ./perf report -i perf.data.arm --vmlinux vmlinux.arm Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v7: - Make norm_arch as global var instead of passing them to each parser.

[PATCH v7 4/6] perf annotate: Support jump instruction with target as second operand

2016-09-21 Thread Ravi Bangoria
r9,1032(r31) 74:ld r9,88(r31) After patch: ld r9,1032(r31) cmpdi cr7,r9,0 v bne74 ld r9,2312(r30) stdr9,1032(r31) 74:ld r9,88(r31) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes

[PATCH] perf tests: Add dwarf unwind test for powerpc

2016-09-19 Thread Ravi Bangoria
dump for powerpc: https://lkml.org/lkml/2016/4/28/482 Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/Build| 1 + tools/perf/arch/powerpc/include/arch-tests.h | 13 tools/perf/arch/powerpc/include/perf_regs.h | 2 + tools/per

Re: [PATCH v7 0/6] perf annotate: Cross arch support + few fixes

2016-09-21 Thread Ravi Bangoria
On Thursday 22 September 2016 01:04 AM, Kim Phillips wrote: > On Wed, 21 Sep 2016 21:17:50 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> Kim, I don't have arm test machine. Can you please help me to test >> this on arm. > This works for

Re: [PATCH v6 4/7] perf annotate: Do not ignore call instruction with indirect target

2016-09-20 Thread Ravi Bangoria
Hi Arnaldo, On Monday 19 September 2016 09:14 PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Aug 19, 2016 at 06:29:35PM +0530, Ravi Bangoria escreveu: >> Do not ignore call instruction with indirect target when its already >> identified as a call. This is an extension of comm

Re: [PATCH v6 2/7] perf annotate: Add cross arch annotate support

2016-08-26 Thread Ravi Bangoria
Hi Kim, I've tested your patch on x86 and powerpc and it looks fine to me. Can you please put your signed-off-by. Please add Act-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> as well. Regards, -Ravi On Wednesday 24 August 2016 02:06 AM, Kim Phillips wrote: > On Tue, 23 Aug 2

Re: [PATCH v7 0/6] perf annotate: Cross arch support + few fixes

2016-09-27 Thread Ravi Bangoria
Hello, Any updates? Arnaldo, if patches looks good to you, can you please pickup them. -Ravi On Wednesday 21 September 2016 09:17 PM, Ravi Bangoria wrote: > Currently Perf annotate support code navigation (branches and calls) > only when run on the same architecture where per

Re: [PATCH 1/3] powerpc: Emulation support for load/store instructions on LE

2016-11-06 Thread Ravi Bangoria
On Sunday 06 November 2016 01:01 AM, Anton Blanchard wrote: > Hi, > >> kprobe, uprobe, hw-breakpoint and xmon are the only user of >> emulate_step. >> >> Kprobe / uprobe single-steps instruction if they can't emulate it, so >> there is no problem with them. As I mention, hw-breakpoint is broken.

[RFC] ppc64le: Enable emulation support for simple Load/Store instructions

2016-10-20 Thread Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Reported-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <r

[PATCH] powerpc/xmon: Fix data-breakpoint

2016-11-22 Thread Ravi Bangoria
with NOTIFY_STOP. Similarly, do_break also returns without notifying to xmon. Solve this by returning NOTIFY_DONE when hw_breakpoint_handler does not find any perf_event associated with matched watchpoint. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- arch/powerpc/kernel/hw_breakp

Re: [PATCH] powerpc/xmon: Fix data-breakpoint

2016-11-22 Thread Ravi Bangoria
Thanks Michael, On Tuesday 22 November 2016 05:03 PM, Michael Ellerman wrote: > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: > >> Xmon data-breakpoint feature is broken. >> >> Whenever there is a watchpoint match occurs, hw_breakpoint_handler will >>

Re: [PATCH 1/3] powerpc: Emulation support for load/store instructions on LE

2016-11-03 Thread Ravi Bangoria
On Thursday 03 November 2016 03:18 PM, Michael Ellerman wrote: > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> writes: > >> On Thursday 03 November 2016 02:34 AM, Anton Blanchard wrote: >>> Hi Ravi, >>> >>>> emulate_step() uses a number of unde

Re: [PATCH 1/3] powerpc: Emulation support for load/store instructions on LE

2016-11-02 Thread Ravi Bangoria
On Thursday 03 November 2016 02:34 AM, Anton Blanchard wrote: > Hi Ravi, > >> emulate_step() uses a number of underlying kernel functions that were >> initially not enabled for LE. This has been rectified since. So, fix >> emulate_step() for LE for the corresponding instructions. > Thanks.

Re: [PATCH 1/3] powerpc: Emulation support for load/store instructions on LE

2016-11-03 Thread Ravi Bangoria
On Friday 04 November 2016 07:37 AM, Andrew Donnellan wrote: > On 03/11/16 21:27, Ravi Bangoria wrote: >> Yes, kernel-space hw-breakpoint feature is broken on LE without this. > > Is there any actual user-visible feature that depends on this, or is this > solely for debuggi

[PATCH 0/3] powerpc: Emulation support for load/store instructions on LE

2016-11-02 Thread Ravi Bangoria
emulation support for all types of (Normal, Floating Point, Vector and Vector Scalar) load/store instructions. - Introduce selftest to test emulate_step for load/store instructions. Ravi Bangoria (3): powerpc: Emulation support for load/store instructions on LE powerpc: Add encoding for couple

[PATCH 1/3] powerpc: Emulation support for load/store instructions on LE

2016-11-02 Thread Ravi Bangoria
emulate_step() uses a number of underlying kernel functions that were initially not enabled for LE. This has been rectified since. So, fix emulate_step() for LE for the corresponding instructions. Reported-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <r

[PATCH 2/3] powerpc: Add encoding for couple of load/store instructions

2016-11-02 Thread Ravi Bangoria
These encodings will be used in subsequent patch that test emulate_step for load/store instructions. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/ppc-opcode.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/a

[PATCH 3/3] powerpc: emulate_step test for load/store instructions

2016-11-02 Thread Ravi Bangoria
: PASS [0.764349] emulate_step smoke test: stvx : PASS [0.764575] emulate_step smoke test: lxvd2x : PASS [0.764788] emulate_step smoke test: stxvd2x: PASS [0.764997] emulate_step smoke test: complete. Signed-off-by: Ravi Bangoria <ravi.ba

Re: [PATCH v7 6/6] perf annotate: cross arch annotate support fixes for ARM

2016-10-10 Thread Ravi Bangoria
On Wednesday 05 October 2016 05:04 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 21, 2016 at 09:17:56PM +0530, Ravi Bangoria escreveu: >> From: Kim Phillips <kim.phill...@arm.com> >> >> For ARM we remove the list that contains non-arm insns, and >> ins

Re: [PATCH v8 1/3] perf annotate: Show raw form for jump instruction with indirect target

2016-12-13 Thread Ravi Bangoria
Hi Arnaldo, Can you please review 2nd and 3rd patch. -Ravi On Monday 05 December 2016 09:26 PM, Ravi Bangoria wrote: > For jump instructions that does not include target address as direct > operand, show the original disassembled line for them. This is needed > for certain pow

Re: [PATCH v8 2/3] perf annotate: Support jump instruction with target as second operand

2016-12-05 Thread Ravi Bangoria
10,r2,-15 ▒ BTW, we have lot of such instructions in kernel. Thanks, -Ravi On Monday 05 December 2016 09:26 PM, Ravi Bangoria wrote: > Arch like powerpc has jump instructions that includes target address > as second operand. For example, 'bne cr7,0xc00f6154'

[PATCH v8 2/3] perf annotate: Support jump instruction with target as second operand

2016-12-05 Thread Ravi Bangoria
ld r9,2312(r30) stdr9,1032(r31) 74:ld r9,88(r31) After patch: ld r9,1032(r31) cmpdi cr7,r9,0 v bne74 ld r9,2312(r30) stdr9,1032(r31) 74:ld r9,88(r31) Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v8 3/3] perf annotate: Fix jump target outside of function address range

2016-12-05 Thread Ravi Bangoria
mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashx,%eax retq Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v8: - v7: https://lkml.org/lkml/2016/9/21/436 - Rebased to acme/perf/core. - No logical c

[PATCH v8 1/3] perf annotate: Show raw form for jump instruction with indirect target

2016-12-05 Thread Ravi Bangoria
bctr ca2c stdr2,24(r1) addis r12,r2,-1 After: ld r12,32088(r12) mtctr r12 v bctr stdr2,24(r1) addis r12,r2,-1 Suggested-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vne

Re: [PATCH] perf TUI: Don't throw error for zero length symbols

2016-12-16 Thread Ravi Bangoria
Hi Arnaldo, Can you please pick this up if it looks good? -Ravi On Tuesday 22 November 2016 02:10 PM, Ravi Bangoria wrote: > perf report (with TUI) exits with error when it finds a sample of zero > length symbol(i.e. addr == sym->start == sym->end). Actually these are > valid

[PATCH] ppc64/kprobe: Fix oops when kprobed on 'stdu' instruction

2017-04-10 Thread Ravi Bangoria
: 8e9f69371536 ("powerpc/kprobe: Don't emulate store when kprobe stwu r1") Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- History: Commit 8e9f69371536 ("powerpc/kprobe: Don't emulate store when kprobe stwu r1") fixed exception frame corruption for 32 bit

[PATCH v2] ppc64/kprobe: Fix oops when kprobed on 'stdu' instruction

2017-04-10 Thread Ravi Bangoria
: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()") Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Reviewed-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- History: Commit 8e9f69371536 ("powerpc/kprobe: Don't emulate

Re: [PATCH v2] ppc64/kprobe: Fix oops when kprobed on 'stdu' instruction

2017-04-11 Thread Ravi Bangoria
Thanks Balbir for the review, On Tuesday 11 April 2017 02:25 PM, Balbir Singh wrote: > On Tue, 2017-04-11 at 10:38 +0530, Ravi Bangoria wrote: >> If we set a kprobe on a 'stdu' instruction on powerpc64, we see a kernel >> OOPS: >> >> [ 1275.165932] Bad ke

  1   2   3   4   5   6   >