[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 --- arch/powerpc/include/asm/ppc-opcode.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include

[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 --- arch

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. Should

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 writes: > >> On Thursday 03 November 2016 02:34 AM, Anton Blanchard wrote: >>> Hi Ravi, >>> >>>> emulate_step() uses a number of underlying kernel functions that were >&g

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

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.

[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 --- arch/powerpc/kernel/hw_breakpoint.c | 4 +++- 1 file chang

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 writes: > >> Xmon data-breakpoint feature is broken. >> >> Whenever there is a watchpoint match occurs, hw_breakpoint_handler will >> be called by do_break via notifier c

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

2016-06-28 Thread Ravi Bangoria
erf report -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 cro

[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 --- 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/tools/perf/util/evse

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

2016-06-28 Thread Ravi Bangoria
re whether 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-of

[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 --- tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tools/perf/util/annotate.c | 10

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

2016-06-28 Thread Ravi Bangoria
From: "Naveen N. Rao" 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-by: Naveen N. Rao Signed-off-by: Ravi Bangoria --- tools/perf/util/annot

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

2016-06-28 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 v2 0/4] perf annotate: Enable cross arch annotate

2016-06-29 Thread Ravi Bangoria
erf report -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: Enab

[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 --- Changes in v2: - No changes 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/tools/per

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

2016-06-29 Thread Ravi Bangoria
re whether 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. Signe

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

2016-06-29 Thread Ravi Bangoria
every time, first check if list already contain object for that nemonics. Signed-off-by: Naveen N. Rao Signed-off-by: Ravi Bangoria --- Changes in v2: - Corrected few memory leaks. - Created Dynamic list for powerpc to optimize memory consumption tools/perf/util/annota

[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 --- Changes in v2: - No changes tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tools/perf/util

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 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

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

2016-06-29 Thread Ravi Bangoria
erf report -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 fetc

[PATCH v3 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 --- 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/tools/perf/util/evsel.c b/tools/perf/util/e

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

2016-06-29 Thread Ravi Bangoria
re whether 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:

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

2016-06-29 Thread Ravi Bangoria
every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao Signed-off-by: Ravi Bangoria --- Changes in v3: - Optimized code - Corrected one memory leak tools/perf/util/annotate.c | 126 + 1 file ch

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

2016-06-29 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 --- Changes in v3: - No changes tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tools

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 a

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
few location. Corrected it. - Moved position of v3 last patch 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

[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 --- Changes in v4: - Moved position of patch tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11

[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 --- Changes in v4: - __maybe_unused was misplaced at few location. Corrected it

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

2016-07-07 Thread Ravi Bangoria
every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao Signed-off-by: Ravi Bangoria --- Chnages in v4: - Added support for branch instructions that includes 'ctr' tools/perf/util/annotate.c | 155 +

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 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/tools/perf/util/annotate.c index

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 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(indicate jump) and &#x

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 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 writes: On Wednesday 06 July 2016 03:38 PM

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 rec

[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 --- Changes in v5: - No changes. tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tools

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

2016-08-18 Thread Ravi Bangoria
//lkml.org/lkml/2016/7/8/10 Naveen N. Rao (1): perf annotate: 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: Sho

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

2016-08-18 Thread Ravi Bangoria
recorded. Signed-off-by: Ravi Bangoria --- 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/perf/util/annotate.c| 133

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

2016-08-18 Thread Ravi Bangoria
about 'bctrl' instruction] Signed-off-by: Ravi Bangoria --- 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(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/a

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

2016-08-18 Thread Ravi Bangoria
nop 10:mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashxffff,%eax retq Signed-off-by: Ravi Bangoria --- Changes in v5: - New patch tools/perf/ui/browsers/annotate.c | 5 +++-- tools/perf/util/annotate.c| 14 +- to

[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 Signed-off-by: Ravi Bangoria --- Changes in

[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 --- Changes in v5: - New patch tools/perf/util/annotate.c | 6 +- 1 file

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

2016-08-18 Thread Ravi Bangoria
ears to be error-prone. So, add function to find instruction instead of creating table. This function dynamically create table (list of 'struct ins'), and instead of creating object every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao

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

2016-08-18 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, R

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 = &quo

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 0/7] perf: Cross arch annotate + few miscellaneous fixes

2016-08-19 Thread Ravi Bangoria
): perf annotate: 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

[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 --- Changes in v6: - No change tools/perf/arch/common.c | 36 ++-- tools/perf/arch/common.h | 11 +++ tools

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

2016-08-19 Thread Ravi Bangoria
recorded. Signed-off-by: Ravi Bangoria --- 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/browsers/annotate.c | 3 +- tools/perf/ui/gtk

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

2016-08-19 Thread Ravi Bangoria
ears to be error-prone. So, add function to find instruction instead of creating table. This function dynamically create table (list of 'struct ins'), and instead of creating object every time, first check if list already contain object for that instruction. Signed-off-by: Naveen N. Rao

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

2016-08-19 Thread Ravi Bangoria
about 'bctrl' instruction] Signed-off-by: Ravi Bangoria --- 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/annotate.c index ea07588..a05423b 100644 --- a/tools/per

[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 Signed-off-by: Ravi Bangoria --- Changes in

[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 --- Changes in v6: - No changes tools/perf/util/annotate.c | 6 +- 1 file

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

2016-08-19 Thread Ravi Bangoria
nop 10:mov_DYNAMIC+0x2e8,%rax movl -bashx16,%fs:(%rax) mov-bashxffff,%eax retq Signed-off-by: Ravi Bangoria --- Changes in v6: - No changes tools/perf/ui/browsers/annotate.c | 5 +++-- tools/perf/util/annotate.c| 14 +- to

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 as well. Regards, -Ravi On Wednesday 24 August 2016 02:06 AM, Kim Phillips wrote: > On Tue, 23 Aug 2016 11:17:16 +0900 > Namhyung

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 an

[PATCH v2] perf test powerpc: Fix 'Object code reading' test

2017-08-31 Thread Ravi Bangoria
disassemble for huge elf sections") in binutils. 2. When the sample is from hypervisor. Hypervisor symbols can not be resolved within guest and thus thread__find_addr_map() fails for such symbols. Fix this by ignoring hypervisor symbols in the test. Signed-off-by: Ravi Bangoria ---

<    1   2   3   4   5   6