[PATCH v2] perf/probe: Change MAX_CMDLEN

2017-02-06 Thread Ravi Bangoria
=%gpr8:s32\ arg5=%gpr7:u64 arg6=%gpr6:s32 arg7=%gpr5:u64 arg8=%gpr4:s32\ arg9=+37(%gpr28):u8 Perf probe fails with seg fault for such markers. As uprobe_events file accepts definition upto 4094 characters(4096 - 2 (\n\0)), increase value of MAX_CMDLEN to 4094. Signed-off-by: Ravi Bangoria

[PATCH 1/5] perf/sdt: Show proper hint

2017-02-02 Thread Ravi Bangoria
ent has to be probed before recording it. Suggested-by: Ingo Molnar Signed-off-by: Ravi Bangoria --- tools/lib/api/fs/tracing_path.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c index 251b7c

[PATCH 5/5] perf/probe: Change MAX_CMDLEN

2017-02-02 Thread Ravi Bangoria
=%gpr8:s32\ arg5=%gpr7:u64 arg6=%gpr6:s32 arg7=%gpr5:u64 arg8=%gpr4:s32\ arg9=+37(%gpr28):u8 Perf probe fails with seg fault for such markers. As uprobe_events file accepts definition beyond 256 characters, increase value of MAX_CMDLEN to 512. Signed-off-by: Ravi Bangoria --- tools/perf

[PATCH 3/5] perf/sdt/x86: Move OP parser to tools/perf/arch/x86/

2017-02-02 Thread Ravi Bangoria
SDT marker argument is in N@OP format. N is the size of argument and OP is the actual assembly operand. OP is arch dependent component and hence it's parsing logic also should be placed under tools/perf/arch/. Signed-off-by: Ravi Bangoria --- tools/perf/arch/x86/util/perf_regs.c

[PATCH 4/5] perf/sdt/powerpc: Add argument support

2017-02-02 Thread Ravi Bangoria
SDT marker argument is in N@OP format. Here OP is arch dependent component. Add powerpc logic to parse OP and convert it to uprobe compatible format. Signed-off-by: Ravi Bangoria --- tools/perf/arch/powerpc/util/perf_regs.c | 115 +++ 1 file changed, 115 insertions

[PATCH 2/5] perf/sdt/x86: Add renaming logic for rNN and other registers

2017-02-02 Thread Ravi Bangoria
'perf probe' is failing for sdt markers whose arguments has rNN (with postfix b/w/d), %rsp, %esp, %sil etc. registers. Add renaming logic for these registers. Signed-off-by: Ravi Bangoria --- tools/perf/arch/x86/util/perf_regs.c | 44 ++-- 1 file c

[PATCH 0/5] perf/sdt: Argument support for x86 and powepc

2017-02-02 Thread Ravi Bangoria
here uprobe definition of sdt event goes beyond current limit MAX_CMDLEN (256) and in such case perf fails with seg fault. I've solve this issue. (patch 5) Note: This patchset is prepared on top of Alexis' v5 series.[1] [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/ms

[PATCH v2] perf/sdt: Show proper hint

2017-02-03 Thread Ravi Bangoria
d (on %idle__add in /usr/lib64/libglib-2.0.so.0.5000.2) You can now use it in all perf tools, such as: perf record -e sdt_glib:idle__add -aR sleep 1 $ perf record -a -e sdt_glib:idle__add [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrot

Re: [PATCH 2/2] perf ppc64le: Fix probe location when using DWARF

2016-08-10 Thread Ravi Bangoria
f/core. From 89c977ae9c3ae35c78b16cddabcf2b01d3cf5cc8 Mon Sep 17 00:00:00 2001 From: Ravi Bangoria Date: Wed, 10 Aug 2016 23:13:45 -0500 Subject: [PATCH] perf ppc64le: Fix build failure when no dwarf support Fix perf build failure on ppc64le because of Commit 99e608b5954c ("perf prob

Re: [PATCH 2/2] perf ppc64le: Fix probe location when using DWARF

2016-08-11 Thread Ravi Bangoria
On Thursday 11 August 2016 05:20 PM, Arnaldo Carvalho de Melo wrote: Em Thu, Aug 11, 2016 at 10:01:04AM +0530, Ravi Bangoria escreveu: On Thursday 11 August 2016 05:24 AM, Anton Blanchard wrote: Hi, Powerpc has Global Entry Point and Local Entry Point for functions. LEP catches call from

[PATCH v2 2/2] perf uprobe: Skip prologue if program compiled without optimization

2016-08-03 Thread Ravi Bangoria
perf script test 6300 [001] 5877.879327: probe_test:foo: (400541) i=42 No need to skip prologue for optimized case since debug info is correct for each instructions for -O2 -g. For more details please visit: https://bugzilla.redhat.com/show_bug.cgi?id=612253#c6 Signed-off-by: Ravi Bangoria --- C

[PATCH 1/2] perf probe: Helper function to check if probe with variable

2016-08-03 Thread Ravi Bangoria
Introduce helper function instead of inline code and replace hardcoded strings "$vars" and "$params" with their corresponding macros. perf_probe_with_var is not declared as static since it will be called from different file in subsequent patch. Signed-off-by: Ravi Bangoria

Re: [PATCH] perf uprobe: Skip prologue if program compiled without optimization

2016-08-03 Thread Ravi Bangoria
Thanks Masami, On Tuesday 02 August 2016 08:22 PM, Masami Hiramatsu wrote: On Mon, 1 Aug 2016 14:19:28 +0530 Ravi Bangoria wrote: Function prologue prepares stack and registers before executing function logic. When target program is compiled without optimization, function parameter

Re: [PATCH v2 2/2] perf uprobe: Skip prologue if program compiled without optimization

2016-08-29 Thread Ravi Bangoria
On Saturday 27 August 2016 01:00 AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Aug 03, 2016 at 02:28:45PM +0530, Ravi Bangoria escreveu: >> +++ b/tools/perf/util/probe-finder.c >> @@ -892,6 +892,169 @@ static int find_probe_point_lazy(Dwarf_Die *sp_die, >> st

Re: [PATCH v2 2/2] perf uprobe: Skip prologue if program compiled without optimization

2016-08-29 Thread Ravi Bangoria
On Saturday 27 August 2016 01:24 AM, Arnaldo Carvalho de Melo wrote: > Em Fri, Aug 26, 2016 at 04:30:27PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Aug 03, 2016 at 02:28:45PM +0530, Ravi Bangoria escreveu: >>> +++ b/tools/perf/util/probe-finder.c >>> @@ -8

[PATCH] perf probe: Move dwarf specific functions to dwarf-aux.c

2016-08-29 Thread Ravi Bangoria
Move generic dwarf related functions from util/probe-finder.c to util/dwarf-aux.c. Function names and their prototype are also changed accordingly. No functionality changes. Suggested-by: Masami Hiramatsu Signed-off-by: Ravi Bangoria --- tools/perf/util/dwarf-aux.c| 135

[PATCH v2] perf probe: Move dwarf specific functions to dwarf-aux.c

2016-08-30 Thread Ravi Bangoria
Move generic dwarf related functions from util/probe-finder.c to util/dwarf-aux.c. Functions name and their prototype are also changed accordingly. No functionality changes. Suggested-by: Masami Hiramatsu Signed-off-by: Ravi Bangoria --- Changes in v2: - Add comments about functions prototype

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

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

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

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

Re: [RFC 3/6] perf annotate: Enable cross arch annotate

2016-06-28 Thread Ravi Bangoria
On Monday 27 June 2016 10:46 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Jun 24, 2016 at 05:23:57PM +0530, Ravi Bangoria escreveu: Change current data structures and function to enable cross arch annotate and add support for x86 and arm instructions. Current implementation does not contain

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

2016-06-30 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 3/4] perf annotate: add powerpc support

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

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

Re: [RFC 4/4] perf kvm: Fix output fields instead of 'trace' for perf kvm report on powerpc

2016-03-02 Thread Ravi Bangoria
Thanks acme, On Wednesday 02 March 2016 09:52 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Mar 02, 2016 at 09:16:48PM +0530, Ravi Bangoria escreveu: Thanks Arnaldo, Please find my comments. On Wednesday 02 March 2016 07:55 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Feb 24, 2016 at 02:37

Re: [RFC 1/4] perf kvm: Enable 'record' on powerpc

2016-03-28 Thread Ravi Bangoria
ar 22, 2016 at 04:12:11PM -0300, Arnaldo Carvalho de Melo escreveu: Em Wed, Feb 24, 2016 at 02:37:42PM +0530, Ravi Bangoria escreveu: 'perf kvm record' is not available on powerpc because 'perf' relies on the 'cycles' event (a PMU event) to profile the guest. However, f

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

2016-03-02 Thread Ravi Bangoria
e_bp_slot() arch_unregister_hw_breakpoint() perf_event_exit_task_context sets child_ctx->task as TASK_TOMBSTONE which is (void *)-1. arch_unregister_hw_breakpoint tries to fetch 'thread' attribute of 'task' resulting in Oops. This patch adds one more condition before accessing data from '

Re: [RFC 4/4] perf kvm: Fix output fields instead of 'trace' for perf kvm report on powerpc

2016-03-02 Thread Ravi Bangoria
Thanks Arnaldo, Please find my comments. On Wednesday 02 March 2016 07:55 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Feb 24, 2016 at 02:37:45PM +0530, Ravi Bangoria escreveu: use_browser = 0; + if (!field_order && + is_perf_data_reorded_on_ppc(session

[PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-12-29 Thread Ravi Bangoria
par_hcall 0.00% :9689[guest.kernel.kallsyms] [g] .__srcu_read_unlock 0.00% :9689[guest.kernel.kallsyms] [g] ._raw_spin_lock 0.00% :9689[guest.kernel.kallsyms] [g] .arch_local_irq_restore Signed-off-by: Ravi Bangoria Signed-off-by: Hemant Kumar --- tool

Re: [PATCH v2 2/3] perf kvm: enable record|report feature on powerpc

2016-02-02 Thread Ravi Bangoria
HI acme, On Tuesday 02 February 2016 02:36 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Jan 22, 2016 at 11:28:11AM +0530, Ravi Bangoria escreveu: + return event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; +} This hunk and the next should be on the previous patch, that is n

Re: [PATCH v2 1/3] perf kvm: Introduce evsel as argument to perf_event__preprocess_sample

2016-02-02 Thread Ravi Bangoria
HI acme, Thanks for reviewing the patch. On Tuesday 02 February 2016 02:23 AM, Arnaldo Carvalho de Melo wrote: Em Fri, Jan 22, 2016 at 11:28:10AM +0530, Ravi Bangoria escreveu: This patch changes prototype of perf_event__preprocess_sample() with additional argument evsel added at last. This

[PATCH v3 1/9] powerpc/watchpoint: Fix 512 byte boundary limit

2020-07-07 Thread Ravi Bangoria
point: Use builtin ALIGN*() macros") Reported-by: Milton Miller Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index daf0e1d

[PATCH v3 4/9] powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR

2020-07-07 Thread Ravi Bangoria
Add new device-tree feature for 2nd DAWR. If this feature is present, 2nd DAWR is supported, otherwise not. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 7 +-- arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH v3 3/9] powerpc/watchpoint: Enable watchpoint functionality on power10 guest

2020-07-07 Thread Ravi Bangoria
CPU_FTR_DAWR to CPU_FTRS_POWER10. Note that this change does not enable 2nd DAWR support. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h

[PATCH v3 2/9] powerpc/watchpoint: Fix DAWR exception constraint

2020-07-07 Thread Ravi Bangoria
affected. Fixes: 27985b2a640e ("powerpc/watchpoint: Don't ignore extraneous exceptions blindly") Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Reported-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi

[PATCH v3 0/9] powerpc/watchpoint: Enable 2nd DAWR on baremetal and powervm

2020-07-07 Thread Ravi Bangoria
...@linux.ibm.com/ v2->v3: - patch #2 is new. It fixes an issue with DAWR exception constraint - Rename dawr1 to debug-facilities-v31 in dt cpu feature, suggested by Nick Piggin. - Rebased to powerpc/next [1]: https://lore.kernel.org/linuxppc-dev/20200514111741.97993-1-ravi.bango...@linux.ibm.com/ R

[PATCH v3 8/9] powerpc/watchpoint: Return available watchpoints dynamically

2020-07-07 Thread Ravi Bangoria
So far Book3S Powerpc supported only one watchpoint. Power10 is introducing 2nd DAWR. Enable 2nd DAWR support for Power10. Availability of 2nd DAWR will depend on CPU_FTR_DAWR1. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 4 +++- arch/powerpc/include/asm

[PATCH v3 7/9] powerpc/watchpoint: Guest support for 2nd DAWR hcall

2020-07-07 Thread Ravi Bangoria
2nd DAWR can be set/unset using H_SET_MODE hcall with resource value 5. Enable powervm guest support with that. This has no effect on kvm guest because kvm will return error if guest does hcall with resource value 5. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hvcall.h | 1

[PATCH v3 5/9] powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit

2020-07-07 Thread Ravi Bangoria
or guests and thus this change is mostly applicable for guests only. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/prom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9cc49f265c86..c76c09b97bc8 100644 --- a/arch/po

[PATCH v3 6/9] powerpc/watchpoint: Rename current H_SET_MODE DAWR macro

2020-07-07 Thread Ravi Bangoria
Current H_SET_MODE hcall macro name for setting/resetting DAWR0 is H_SET_MODE_RESOURCE_SET_DAWR. Add suffix 0 to macro name as well. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hvcall.h | 2 +- arch/powerpc/include/asm/plpar_wrappers.h | 2 +- arch/powerpc/kvm/book3s_hv.c

[PATCH v3 9/9] powerpc/watchpoint: Remove 512 byte boundary

2020-07-07 Thread Ravi Bangoria
Power10 has removed 512 bytes boundary from match criteria. i.e. The watch range can cross 512 bytes boundary. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/hw_breakpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c b

[PATCH 1/2] libsubcmd: Fix OPT_CALLBACK_SET()

2020-06-19 Thread Ravi Bangoria
BACK_SET()") Signed-off-by: Ravi Bangoria --- tools/lib/subcmd/parse-options.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c index dbb9efbf718a..39ebf6192016 100644 --- a/tools/lib/subcmd/parse-options.c +++ b/too

[PATCH 2/2] perf record: Fix --switch-output=time documentation

2020-06-19 Thread Ravi Bangoria
perf record man page uses word 'size' while describing --switch-output=time option. Fix that. Signed-off-by: Ravi Bangoria --- tools/perf/Documentation/perf-record.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-record.txt b/

Re: [PATCH v5 5/8] powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N

2020-08-25 Thread Ravi Bangoria
Hi Christophe, diff --git a/arch/powerpc/kernel/ptrace/ptrace-noadv.c b/arch/powerpc/kernel/ptrace/ptrace-noadv.c index 57a0ab822334..866597b407bc 100644 --- a/arch/powerpc/kernel/ptrace/ptrace-noadv.c +++ b/arch/powerpc/kernel/ptrace/ptrace-noadv.c @@ -286,11 +286,16 @@ long ppc_del_hwdebug(st

Re: [PATCH v5 4/8] powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c

2020-08-25 Thread Ravi Bangoria
Hi Christophe, +static int cache_op_size(void) +{ +#ifdef __powerpc64__ +    return ppc64_caches.l1d.block_size; +#else +    return L1_CACHE_BYTES; +#endif +} You've got l1_dcache_bytes() in arch/powerpc/include/asm/cache.h to do that. + +void wp_get_instr_detail(struct pt_regs *regs, struct

[PATCH] perf powerpc: Don't ignore sym-handling.c file

2020-05-09 Thread Ravi Bangoria
: Consolidate symbol fixup issue") Reported-by: Sandipan Das Signed-off-by: Ravi Bangoria --- tools/perf/arch/powerpc/util/Build | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/util/Build index e5c9504f8586..e86e210bf514 100

[PATCH v5 02/16] powerpc/watchpoint: Add SPRN macros for second DAWR

2020-05-10 Thread Ravi Bangoria
Power10 is introducing second DAWR. Add SPRN_ macros for the same. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH v5 01/16] powerpc/watchpoint: Rename current DAWR macros

2020-05-10 Thread Ravi Bangoria
Power10 is introducing second DAWR. Use real register names from ISA for current macros: s/SPRN_DAWR/SPRN_DAWR0/ s/SPRN_DAWRX/SPRN_DAWRX0/ Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/reg.h | 4 ++-- arch/powerpc/kernel/dawr.c

[PATCH v5 05/16] powerpc/watchpoint: Provide DAWR number to set_dawr

2020-05-10 Thread Ravi Bangoria
Introduce new parameter 'nr' to set_dawr() which indicates which DAWR should be programed. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h | 4 ++-- arch/powerpc/kernel/dawr.c | 15 ++- arch/powe

[PATCH v5 06/16] powerpc/watchpoint: Provide DAWR number to __set_breakpoint

2020-05-10 Thread Ravi Bangoria
Introduce new parameter 'nr' to __set_breakpoint() which indicates which DAWR should be programed. Also convert current_brk variable to an array. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/debug.h | 2 +- arch/powerpc/i

[PATCH v5 04/16] powerpc/watchpoint/ptrace: Return actual num of available watchpoints

2020-05-10 Thread Ravi Bangoria
User can ask for num of available watchpoints(dbginfo.num_data_bps) using ptrace(PPC_PTRACE_GETHWDBGINFO). Return actual number of available watchpoints on the machine rather than hardcoded 1. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/kernel/ptrace/ptrace

[PATCH v5 00/16] powerpc/watchpoint: Preparation for more than one watchpoint

2020-05-10 Thread Ravi Bangoria
ps://lore.kernel.org/linuxppc-dev/20200430043417.30948-1-ravi.bango...@linux.ibm.com v4->v5: - s/future power architecture/Power10/ - s/dawr/DAWR/ in commit descriptions [1]: https://www-355.ibm.com/systems/power/openpower/ Ravi Bangoria (16): powerpc/watchpoint: Rename current DAWR macros

[PATCH v5 03/16] powerpc/watchpoint: Introduce function to get nr watchpoints dynamically

2020-05-10 Thread Ravi Bangoria
M_MAX, which will now represent maximum number of watchpoints supported by Powerpc. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/cputable.h | 6 +- arch/powerpc/include/asm/hw_breakpoint.h | 5 + arch/powerpc/include/asm/processor.h | 2 +-

[PATCH v5 07/16] powerpc/watchpoint: Get watchpoint count dynamically while disabling them

2020-05-10 Thread Ravi Bangoria
Instead of disabling only one watchpoint, get num of available watchpoints dynamically and disable all of them. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH v5 12/16] powerpc/watchpoint: Use builtin ALIGN*() macros

2020-05-10 Thread Ravi Bangoria
Currently we calculate hw aligned start and end addresses manually. Replace them with builtin ALIGN_DOWN() and ALIGN() macros. So far end_addr was inclusive but this patch makes it exclusive (by avoiding -1) for better readability. Suggested-by: Christophe Leroy Signed-off-by: Ravi Bangoria

[PATCH v5 11/16] powerpc/watchpoint: Introduce is_ptrace_bp() function

2020-05-10 Thread Ravi Bangoria
Introduce is_ptrace_bp() function and move the check inside the function. It will be utilize more in later set of patches. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/kernel/hw_breakpoint.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a

[PATCH v5 14/16] powerpc/watchpoint: Don't allow concurrent perf and ptrace events

2020-05-10 Thread Ravi Bangoria
ime if their address range overlaps. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/hw_breakpoint.h | 2 + arch/powerpc/kernel/hw_breakpoint.c | 221 +++ kernel/events/hw_breakpoint.c| 16 ++ 3 files changed, 239

[PATCH v5 08/16] powerpc/watchpoint: Disable all available watchpoints when !dawr_force_enable

2020-05-10 Thread Ravi Bangoria
-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/kernel/dawr.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/dawr.c b/arch/powerpc/kernel/dawr.c index 8114ad3a8574..500f52fa4711 100644 --- a/arch/powerpc/kernel/dawr.c +++ b

[PATCH v5 16/16] powerpc/watchpoint/xmon: Support 2nd DAWR

2020-05-10 Thread Ravi Bangoria
Add support for 2nd DAWR in xmon. With this, we can have two simultaneous breakpoints from xmon. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/xmon/xmon.c | 101 ++- 1 file changed, 69 insertions(+), 32 deletions(-) diff --git a

[PATCH v5 09/16] powerpc/watchpoint: Convert thread_struct->hw_brk to an array

2020-05-10 Thread Ravi Bangoria
So far powerpc hw supported only one watchpoint. But Power10 is introducing 2nd DAWR. Convert thread_struct->hw_brk into an array. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/processor.h | 2 +- arch/powerpc/kernel/process.c |

[PATCH v5 15/16] powerpc/watchpoint/xmon: Don't allow breakpoint overwriting

2020-05-10 Thread Ravi Bangoria
Xmon allows overwriting breakpoints because it's supported by only one DAWR. But with multiple DAWRs, overwriting becomes ambiguous or unnecessary complicated. So let's not allow it. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/xmon/xmon.c | 4 1 fi

[PATCH v5 10/16] powerpc/watchpoint: Use loop for thread_struct->ptrace_bps

2020-05-10 Thread Ravi Bangoria
. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/kernel/hw_breakpoint.c | 7 -- arch/powerpc/kernel/process.c | 6 - arch/powerpc/kernel/ptrace/ptrace-noadv.c | 28 +-- 3 files changed, 31 insertions(+), 10 deletions

[PATCH v5 13/16] powerpc/watchpoint: Prepare handler to handle more than one watcnhpoint

2020-05-10 Thread Ravi Bangoria
configured for readonly watchpoint and the instruction is store, this DAWR must not have caused exception. Signed-off-by: Ravi Bangoria Reviewed-by: Michael Neuling --- arch/powerpc/include/asm/processor.h | 2 +- arch/powerpc/include/asm/sstep.h | 2 + arch/powerpc/kernel/hw_breakpoint.c

Re: [PATCH 2/2] powerpc/perf: Add support for outputting extended regs in perf intr_regs

2020-05-05 Thread Ravi Bangoria
cra" + [PERF_REG_POWERPC_MMCRA] = "mmcra", + [PERF_REG_POWERPC_MMCR0] = "mmcr0", + [PERF_REG_POWERPC_MMCR1] = "mmcr1", + [PERF_REG_POWERPC_MMCR2] = "mmcr2", + Unnecesasy line. Apart from those, for the series: Reviewed-and-Tested-by: Ravi Bangoria

[PATCH 1/7] powerpc/watchpoint: Enable watchpoint functionality on power10 guest

2020-06-01 Thread Ravi Bangoria
CPU_FTR_DAWR to CPU_FTRS_POWER10. Note that this change does not enable 2nd DAWR support yet. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm

[PATCH 4/7] powerpc/watchpoint: Rename current H_SET_MODE DAWR macro

2020-06-01 Thread Ravi Bangoria
Current H_SET_MODE hcall macro name for setting/resetting DAWR0 is H_SET_MODE_RESOURCE_SET_DAWR. Add suffix 0 to macro name as well. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hvcall.h | 2 +- arch/powerpc/include/asm/plpar_wrappers.h | 2 +- arch/powerpc/kvm/book3s_hv.c

[PATCH 2/7] powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR

2020-06-01 Thread Ravi Bangoria
Add new device-tree feature for 2nd DAWR. If this feature is present, 2nd DAWR is supported, otherwise not. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 7 +-- arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH 3/7] powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit

2020-06-01 Thread Ravi Bangoria
and thus this change is mostly applicable for guests only. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/prom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 1dcf0e214a22..6de59de579f7 100644 --- a/arch/powerpc/kernel/prom.c ++

[PATCH 0/7] powerpc/watchpoint: Enable 2nd DAWR on baremetal and powervm

2020-06-01 Thread Ravi Bangoria
s. [1]: https://lore.kernel.org/linuxppc-dev/20200514111741.97993-1-ravi.bango...@linux.ibm.com/ [2]: https://lore.kernel.org/linuxppc-dev/20200521014341.29095-1-alist...@popple.id.au Ravi Bangoria (7): powerpc/watchpoint: Enable watchpoint functionality on power10 guest powerpc/dt_cpu_ftrs: Add

<    1   2   3   4   5   6   7   8   9   >