Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-19 Thread Ravi Bangoria
Thanks Masami for detailed review. Please see my comments below. On Friday 17 March 2017 02:35 PM, Masami Hiramatsu wrote: > Hi Ravi, > > (I avoided to review parser part since it may go to yacc in next version) > > On Tue, 14 Mar 2017 20:36:54 +0530 > Ravi Ba

Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-15 Thread Ravi Bangoria
On Wednesday 15 March 2017 06:46 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 15, 2017 at 01:03:31PM +0100, Jiri Olsa escreveu: >> On Tue, Mar 14, 2017 at 08:36:54PM +0530, Ravi Bangoria wrote: >>> +++ b/tools/perf/builtin-record.c >>> +static int record__parse

[PATCH] perf stat: Correct --no-aggr description

2017-03-20 Thread Ravi Bangoria
2,69,72,403 cycles CPU1 2,02,08,327 instructions # 0.34 insn per cycle CPU2 73,17,123 instructions # 0.12 insn per cycle 1.000989132 seconds time elapsed Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/Documentation/perf-stat.txt | 3

Re: [PATCH 1/2] perf probe: Fix concat_probe_trace_events

2017-03-20 Thread Ravi Bangoria
On Wednesday 08 March 2017 02:07 PM, Masami Hiramatsu wrote: > On Wed, 8 Mar 2017 12:29:07 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> '*ntevs' contains number of elements present in 'tevs' array. If >> there are no elements in array, 'tevs

Re: [PATCH v5 4/7] perf/sdt: Allow recording of existing events

2017-03-20 Thread Ravi Bangoria
Thanks Masami for detailed review. Please see my comments below. On Saturday 18 March 2017 04:43 AM, Masami Hiramatsu wrote: > On Tue, 14 Mar 2017 20:36:55 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> } >> } >> >

Re: [PATCH v5 7/7] perf/sdt: List events fetched from uprobe_events

2017-03-20 Thread Ravi Bangoria
On Saturday 18 March 2017 04:44 AM, Masami Hiramatsu wrote: > The title of this patch seems not correct. Oops. Sorry about that. Actual title is: "perf/sdt: Remove stale warning" Thanks for reporting, Ravi > On Tue, 14 Mar 2017 20:36:58 +0530 > Ravi B

Re: [PATCH v5 0/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-16 Thread Ravi Bangoria
Hi Masami, On Thursday 16 March 2017 03:21 PM, Masami Hiramatsu wrote: > On Tue, 14 Mar 2017 20:36:51 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> Changes in v5: >> - Patch 2/7 is new. New option introduced in this patch helps to pass >>

[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

Re: [PATCH v3 0/3] perf/sdt: Hardening argument support

2017-04-01 Thread Ravi Bangoria
On Tuesday 28 March 2017 09:10 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 29, 2017 at 12:29:29AM +0900, Masami Hiramatsu escreveu: >> Hi Arnaldo, >> >> please pull this, I've already acked to this series. > I did it 15 minutes ago, running build tests on it now. Hi Arnaldo, Thanks for

[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

[PATCH] perf trace: Add usage of --no-syscalls in man page

2017-04-13 Thread Ravi Bangoria
perf trace supports --no-syscalls option but it's not listed in the man page. (Though, I see an example using --no-syscalls in EXAMPLES section.) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/Documentation/perf-trace.txt | 3 ++- 1 file changed, 2 inse

Re: [PATCH] perf trace: Add usage of --no-syscalls in man page

2017-04-14 Thread Ravi Bangoria
Hi Arnaldo, Thanks for pulling the patch. On Thursday 13 April 2017 07:21 PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 13, 2017 at 11:32:12AM +0530, Ravi Bangoria escreveu: >> perf trace supports --no-syscalls option but it's not listed in >> the man page. (Though, I see a

[PATCH v5 0/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-14 Thread Ravi Bangoria
: https://lkml.org/lkml/2017/3/6/565 [1] https://lkml.org/lkml/2017/2/7/59 [2] https://lkml.org/lkml/2016/5/3/810 Hemant Kumar (1): perf/sdt: Directly record SDT events with 'perf record' Ravi Bangoria (6): perf/sdt: Introduce util func is_sdt_event() perf tool: Add option macro

[PATCH v5 1/7] perf/sdt: Introduce util func is_sdt_event()

2017-03-14 Thread Ravi Bangoria
Factor out the SDT event name checking routine as is_sdt_event(). Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/parse-events.h | 20 tools/perf/util/probe-event.c | 9 + 2 files changed, 21 insertions(+), 8 deletions(-)

[PATCH v5 7/7] perf/sdt: List events fetched from uprobe_events

2017-03-14 Thread Ravi Bangoria
Perf was showing warning if user tries to record sdt event without creating a probepoint. Now we are allowing direct record on sdt events, remove this stale warning/hint. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/lib/api/fs/tracing_path.c | 17 --

[PATCH v5 4/7] perf/sdt: Allow recording of existing events

2017-03-14 Thread Ravi Bangoria
:* Warning: Recording on 2 occurrences of sdt_libpthread:* $ sudo ./perf evlist sdt_libpthread:mutex_release_3 sdt_libpthread:mutex_release_1 Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c

[PATCH v5 5/7] perf/sdt: Warn when number of events recorded are not equal to cached events

2017-03-14 Thread Ravi Bangoria
. Hint: Please use 'perf probe -d sdt_libpthread:*' to allow record on all events. $ sudo ./perf evlist sdt_libpthread:mutex_release_3 sdt_libpthread:mutex_release_2 sdt_libpthread:mutex_release_1 sdt_libpthread:mutex_release Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v5 6/7] perf/sdt: List events fetched from uprobe_events

2017-03-14 Thread Ravi Bangoria
:0xb126 $ sudo ./perf record -a -e sdt_libpthread:mutex_release Matching event(s) from uprobe_events: sdt_libpthread:mutex_release 0xb126@/usr/lib64/libpthread-2.24.so Use 'perf probe -d ' to delete event(s). Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.

[PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-14 Thread Ravi Bangoria
Error: sdt_libpthread:mutex_entry_1 not found in the cache invalid or unsupported event: 'sdt_libpthread:mutex_entry_1' Signed-off-by: Hemant Kumar <hem...@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/builtin-record.c| 27 ++

[PATCH v5 2/7] perf tool: Add option macro OPT_CALLBACK_ARG

2017-03-14 Thread Ravi Bangoria
Add an option macro that is the same as OPT_CALLBACK_OPTARG except that the argument is not optional. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/lib/subcmd/parse-options.h | 4 1 file changed, 4 insertions(+) diff --git a/tools/lib/subcmd/parse-optio

Re: [PATCH 2/2] perf probe: Remove stale func add_perf_probe_events

2017-03-08 Thread Ravi Bangoria
Thanks Masami for the review, On Wednesday 08 March 2017 03:13 PM, Masami Hiramatsu wrote: > On Wed, 8 Mar 2017 12:29:08 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> I don't see any user of this function. This function was being copied >> to

[PATCH v4 7/7] perf/sdt: Remove stale warning

2017-03-06 Thread Ravi Bangoria
Perf was showing warning if user tries to record sdt event without creating a probepoint. Now we are allowing direct record on sdt events, remove this stale warning/hint. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/lib/api/fs/tracing_path.c | 17 --

[PATCH v4 2/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-06 Thread Ravi Bangoria
Error: sdt_libpthread:mutex_entry_1 not found in the cache invalid or unsupported event: 'sdt_libpthread:mutex_entry_1' Signed-off-by: Hemant Kumar <hem...@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/builtin-record.c| 24

[PATCH v4 0/7] perf/sdt: Directly record SDT events with 'perf record'

2017-03-06 Thread Ravi Bangoria
with 'perf record' Ravi Bangoria (6): perf/sdt: Introduce util func is_sdt_event() perf/sdt: Allow recording of existing events perf/sdt: Clean uprobe_events when event(out of multiple events) parsing fails perf/sdt: Warn when number of events recorded are not equal to cached events

[PATCH v4 3/7] perf/sdt: Allow recording of existing events

2017-03-06 Thread Ravi Bangoria
:* Warning: Recording on 2 occurrences of sdt_libpthread:* $ sudo ./perf evlist sdt_libpthread:mutex_release_3 sdt_libpthread:mutex_release_1 Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c | 58 +- tools/perf/util/probe-e

[PATCH v4 6/7] perf/sdt: List events fetched from uprobe_events

2017-03-06 Thread Ravi Bangoria
:0xb126 $ sudo ./perf record -a -e sdt_libpthread:mutex_release Matching event(s) from uprobe_events: sdt_libpthread:mutex_release 0xb126@/usr/lib64/libpthread-2.24.so Use 'perf probe -d ' to delete event(s). Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.

[PATCH v4 1/7] perf/sdt: Introduce util func is_sdt_event()

2017-03-06 Thread Ravi Bangoria
Factor out the SDT event name checking routine as is_sdt_event(). Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/parse-events.h | 12 tools/perf/util/probe-event.c | 9 + 2 files changed, 13 insertions(+), 8 deletions(-) diff

[PATCH v4 4/7] perf/sdt: Clean uprobe_events when event(out of multiple events) parsing fails

2017-03-06 Thread Ravi Bangoria
User may ask for multiple events in the same record command like, perf record -a -e sdt_1:* -e sdt_2:* If sdt_1:* events are already added to uprobe_events and sdt_2:* event parsing fails, clean sdt_1:* events from uprobe_events. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.

[PATCH v4 5/7] perf/sdt: Warn when number of events recorded are not equal to cached events

2017-03-06 Thread Ravi Bangoria
. Hint: Please use 'perf probe -d sdt_libpthread:*' to allow record on all events. $ sudo ./perf evlist sdt_libpthread:mutex_release_3 sdt_libpthread:mutex_release_2 sdt_libpthread:mutex_release_1 sdt_libpthread:mutex_release Signed-off-by: Ravi Bangoria <ravi.ba

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

2017-03-06 Thread Ravi Bangoria
On Tuesday 07 February 2017 08:25 AM, Masami Hiramatsu wrote: > On Thu, 2 Feb 2017 16:41:38 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> The v5 patchset for sdt marker argument support for x86 [1] has >> couple of issues. For example, it

[PATCH 2/2] perf probe: Remove stale func add_perf_probe_events

2017-03-08 Thread Ravi Bangoria
I don't see any user of this function. This function was being copied to tools/perf/builtin-probe.c by commit b02137cc6550 ("perf probe: Move print logic into cmd_probe()"). Since then it has became stale. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools

[PATCH 1/2] perf probe: Fix concat_probe_trace_events

2017-03-08 Thread Ravi Bangoria
ached events") Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 28fb62c..4f9d6ee 100644 --- a/tools/perf/ut

[PATCH] perf probe: Fix build failure for get_target_map()

2017-07-17 Thread Ravi Bangoria
x it by changing parameters of get_target_map(). Fixes: 801bc8193463 ("perf probe: Allow placing uprobes in alternate namespaces.") Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/util/sym-handling.c | 2 +- 1 file changed, 1 inserti

[PATCH] perf/annotate/powerpc: Fix branch instruction with multiple operands

2017-05-25 Thread Ravi Bangoria
ed-by: Anton Blanchard <an...@samba.org> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/annotate.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 683f834..a031c4d

Re: [PATCH v2] perf/annotate: Fix branch instruction with multiple operands

2017-06-01 Thread Ravi Bangoria
Hi Kim, Arnaldo, On Thursday 01 June 2017 07:59 PM, Kim Phillips wrote: > v2: addressing Arnaldo's clean-this-up comment: merged commit texts > between Ravi's original, author changed in lieu of adding something I > hadn't known nor thought about possibly doing: Originally-by: Ravi. > Ravi, if

[PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
241631] [c000bbaabdf0] [c010be70] call_usermodehelper_exec_async+0x170/0x210 [ 131.241955] [c000bbaabe30] [c000bae0] ret_from_kernel_thread+0x5c/0x7c Fix it by setting abi to PERF_SAMPLE_REGS_ABI_NONE when userspace pt_regs are not set. Signed-off-by: Ravi Bangoria <r

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-16 Thread Ravi Bangoria
Hi Michael, On Friday 16 June 2017 10:42 AM, Michael Ellerman wrote: > > That function (perf_get_regs_user()) didn't exist until 4.7, ie: > > ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register > state") > > So there must be something else going on. > > I'll hold off on

Re: [PATCH] ppc64/perf: Fix oops when kthread execs user process

2017-06-15 Thread Ravi Bangoria
Thanks Naveen, On Thursday 15 June 2017 08:57 PM, Naveen N. Rao wrote: > Hmm... are you sure it's the same issue? The above commit only went into > v4.7, which means we weren't able to use --call-graph=dwarf till v4.7. Yes sorry. It's from v4.7 onwards. -Ravi

Re: [PATCH v2] perf: libdw support for powerpc [ping]

2017-06-15 Thread Ravi Bangoria
Works like a charm with Milian's patch. Acked-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Note: I still see very minor differences between libunwind and libdw. Also, second last function gets repeated two times in every callchain but it can be fixed later on. Otherwise all look

Re: [PATCH v2] perf: libdw support for powerpc [ping]

2017-06-13 Thread Ravi Bangoria
Hi Mark, On Tuesday 13 June 2017 05:14 PM, Mark Wielaard wrote: > I see the same on very short runs. But when doing a slightly longer run, > even just using ls -lahR, which does some more work, then I do see user > backtraces. They are still missing for some of the early samples though. > It is

Re: [PATCH v2] perf: libdw support for powerpc [ping]

2017-06-12 Thread Ravi Bangoria
en for binaries that do not have CFI information. In addition, >> libunwind is always preferred to libdw by the build machinery so this >> cannot introduce regressions on machines that have both libunwind and >> libdw installed. >> >> Cc: a...@kernel.org >>

[PATCH] perf annotate: Fix failure when filename has special chars

2017-05-05 Thread Ravi Bangoria
=0x8184e848 -l -d --no-show-raw -S -C ./vmlinux(test) 2>/dev/null|grep -v ./vmlinux(test):|expand' Fix it by surrounding filename in double quotes. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] Fixed a pathing issue with objdump and grep

2017-05-05 Thread Ravi Bangoria
; the name of the DSO containing symbols also assumed no spaces existed >> in the pathname, so grep also parsed these as extra positional >> arguments. > This one didn't apply to tip/perf/urgent, so I tried another patch > addressing the same issue, from Ravi Bangoria, and it

Re: [PATCH] Fixed a pathing issue with objdump and grep

2017-05-05 Thread Ravi Bangoria
On Friday 05 May 2017 06:52 PM, Ravi Bangoria wrote: > > On Friday 05 May 2017 06:27 PM, Arnaldo Carvalho de Melo wrote: >> Em Wed, May 03, 2017 at 12:12:23PM +, Adam Stylinski escreveu: >>> The path fed to the argument for objdump used in the perf-annotate >>>

Re: [PATCH] perf/annotate: Fix branch instruction with multiple operands

2017-06-01 Thread Ravi Bangoria
linux]$ git log | grep -i originally-by: | wc -l > 58 > [acme@jouet linux]$ > > Originally-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> > > Ravi? > > I'm trying to catch up on my patch queue, so haven't read this > thoroughly to have an idea if this is fair or OK,

[PATCH] powerpc/sysrq: Fix oops whem ppmu is not registered

2017-09-19 Thread Ravi Bangoria
x6c Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- arch/powerpc/perf/core-book3s.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.

[PATCH] perf callchain: Compare dsos (as well) for CCKEY_FUNCTION

2017-10-04 Thread Ravi Bangoria
<pozdne...@gmail.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/callchain.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index be09d77..6d7f645 100644 ---

[PATCH v2] perf callchain: Compare dsos (as well) for CCKEY_FUNCTION

2017-10-05 Thread Ravi Bangoria
<pozdne...@gmail.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Changes in v2: - Remove unnecessary checks for 'map' tools/perf/util/callchain.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/callchain.c b/too

[RFC] perf callchain: Compare dsos (as well) for CCKEY_FUNCTION

2017-10-04 Thread Ravi Bangoria
<pozdne...@gmail.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/callchain.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index 510b513..6d5a483 100644 ---

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

2017-08-31 Thread Ravi Bangoria
e 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 <ravi.bango...@linux

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

2017-08-31 Thread Ravi Bangoria
e 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 <ravi.bango...@linux.vnet.ibm.co

[PATCH] perf record: Fix tool crash with xyarray

2017-10-18 Thread Ravi Bangoria
)[0x7f7fd8571830] ./perf(_start+0x29)[0x427a59] This is because functions xyarray__max_x() and xyarray__max_y() are returning incorrect values, causing crash while accessing xyarray. Fixes: d74be4767367 ("perf xyarray: Save max_x, max_y") Signed-off-by: Ravi Bangoria &

[PATCH] perf tool: Fix build failure when NO_AUXTRACE=1

2017-11-12 Thread Ravi Bangoria
^ Fix it by guarding function under HAVE_AUXTRACE_SUPPORT. Fixes: 47e5a26a916b ("perf script: Fix --per-event-dump for auxtrace synth evsels") Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/buil

Re: [PATCH] perf annotate: Remove precision for mnemonics

2017-11-15 Thread Ravi Bangoria
On 11/14/2017 06:34 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Nov 14, 2017 at 08:55:40AM +0530, Ravi Bangoria escreveu: There are many instructions, esp on powerpc, whose mnemonics are longer than 6 characters. Using precision limit causes truncation of such mnemonics. Fix this by removing

Re: [PATCH v1 3/9] perf util: Reconstruct rblist for supporting per-thread shadow stats

2017-11-21 Thread Ravi Bangoria
On 11/20/2017 08:13 PM, Jin Yao wrote: @@ -76,6 +97,17 @@ static struct rb_node *saved_value_new(struct rblist *rblist __maybe_unused, return >rb_node; } +static void saved_value_delete(struct rblist *rblist __maybe_unused, + struct rb_node *rb_node) +{

Re: [PATCH] Use more flexible pattern matching for CPU identification for mapfile.csv

2017-11-22 Thread Ravi Bangoria
the patch can be optimized a bit. Please see my comments. Looks ok, but you forgot to add lkml to the CC list, I'm doing that now and also adding Ravi Bangoria @ IBM, which sent yet another of those lines that would match your regexp. Ravi & IBM crew, please see if we can proceed with Will's re

[PATCH] perf tool powerpc: Add Power9 DD2.1 PVR

2017-11-22 Thread Ravi Bangoria
From: Madhavan Srinivasan <ma...@linux.vnet.ibm.com> This will enable parsing JSON files on Power9 DD2.1. Signed-off-by: Madhavan Srinivasan <ma...@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/pmu-events/arch/powerpc/ma

Re: [PATCH] perf annotate: Fix unnecessary memory allocation for s390x

2017-11-29 Thread Ravi Bangoria
r 0m0.587s > sys 0m1.530s > [root@s35lp76 perf]# fgrep '__ins__find sorted:1 nr_instructions:' > /tmp/xxxaa | tail -1 > __ins__find sorted:1 nr_instructions:56 ins:0x3f406570 > [root@s35lp76 perf]# > > The number of different s390x branch/jump/cal

Re: [PATCH] perf annotate: Fix objdump comment parsing for Intel mov dissassembly

2017-11-29 Thread Ravi Bangoria
On 11/28/2017 01:26 PM, Thomas Richter wrote: > The command 'perf annotate' parses the output of objdump and also > investigates the comments produced by objdump. For example the > output of objdump produces (on x86): > > 23eee: 4c 8b 3d 13 01 21 00 mov 0x210113(%rip),%r15 >

Re: [PATCH] perf annotate: Fix objdump comment parsing for Intel mov dissassembly

2017-11-29 Thread Ravi Bangoria
On 11/29/2017 08:33 PM, Thomas-Mich Richter wrote: > On 11/29/2017 02:24 PM, Ravi Bangoria wrote: >> >> On 11/28/2017 01:26 PM, Thomas Richter wrote: >>> The command 'perf annotate' parses the output of objdump and also >>> investigates the comments

[PATCH] powerpc/perf: Fix oops when grouping different pmu events

2017-11-30 Thread Ravi Bangoria
as memory address for imc events. While grouping these two types of events, collect_events() tries to interpret imc 'event_base' as a flag, which causes a corruption resulting in a crash. Consider only those events which belongs to 'perf_hw_context' in collect_events(). Signed-off-by: Ravi

Re: [PATCH v4] Use more flexible pattern matching for CPU identification for mapfile.csv

2017-12-04 Thread Ravi Bangoria
of various distibutions of Linux having to > wait for a new release of the kernel's perf tool to be built with > these trivial patches is inconvenient. > Tested-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Thanks, Ravi

Re: [PATCH] powerpc/perf: Dereference bhrb entries safely

2017-12-18 Thread Ravi Bangoria
Hi Balbir, Sorry was away for few days. On 12/14/2017 05:54 PM, Balbir Singh wrote: > On Tue, Dec 12, 2017 at 11:29 PM, Ravi Bangoria > <ravi.bango...@linux.vnet.ibm.com> wrote: >> It may very well happen that branch instructions recorded by >> bhrb entries already get

[PATCH] perf annotate: Remove precision for mnemonics

2017-11-13 Thread Ravi Bangoria
,-1 xscvdp vs1,vs1 add. r10,r10,r11 After: li r11,-1 xscvdpsxds vs1,vs1 add. r10,r10,r11 Reported-by: Donald Stence <dste...@us.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/annotate.c | 18 +- 1

Re: [PATCH 16/35] perf annotate: Add samples into struct annotation_line

2017-11-14 Thread Ravi Bangoria
Hi Jiri, On 11/14/2017 03:01 PM, Jiri Olsa wrote: On Mon, Nov 13, 2017 at 09:14:38PM +0100, Jiri Olsa wrote: On Mon, Nov 13, 2017 at 09:16:20PM +0530, Ravi Bangoria wrote: Hi Jiri, This patch seems to be causing segfault with "perf top --stdio". Steps to reproduce: 1. start

Re: [PATCH 16/35] perf annotate: Add samples into struct annotation_line

2017-11-13 Thread Ravi Bangoria
Hi Jiri, This patch seems to be causing segfault with "perf top --stdio". Steps to reproduce: 1. start "perf top --stdio" in one terminal 2. run some simple workload in another terminal, let it get finished. 3. annotate function from previous workload in perf top (press 'a' followed by 's')

Re: [PATCH 16/35] perf annotate: Add samples into struct annotation_line

2017-11-15 Thread Ravi Bangoria
Hi Jiri, On 11/15/2017 07:34 PM, Jiri Olsa wrote: On Tue, Nov 14, 2017 at 11:29:54AM +0100, Jiri Olsa wrote: On Tue, Nov 14, 2017 at 03:45:27PM +0530, Ravi Bangoria wrote: Hi Jiri, On 11/14/2017 03:01 PM, Jiri Olsa wrote: On Mon, Nov 13, 2017 at 09:14:38PM +0100, Jiri Olsa wrote: On Mon

Re: [PATCH] PM_RUN_CYC_SMT2_MODE event not suported on P9

2017-11-15 Thread Ravi Bangoria
n": "Data TLB Miss page size 16G" } -] \ No newline at end of file +] ^^^ This 'newline thing' is unnecessary change. Can you please resend the patch without it. Otherwise, Ack-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Thanks, Ravi

Re: [PATCH v2 0/5] perf-probe: Improve probing on versioned symbols

2017-12-08 Thread Ravi Bangoria
On 12/08/2017 09:54 PM, Masami Hiramatsu wrote: > On Thu, 7 Dec 2017 18:17:51 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> >> On 12/07/2017 12:49 PM, Masami Hiramatsu wrote: >>> Hi, >>> >>> Here is the 2nd vers

Re: [PATCH 0/5] perf-probe: Improve probing on versioned symbols

2017-12-06 Thread Ravi Bangoria
Hi Masami, On 12/06/2017 08:36 AM, Masami Hiramatsu wrote: > [4/5] Find versioned symbol from map without wildcard. >This allows user to specify a symbol without version >suffix nor wildcard. Anyway, at this point we have >no way to specify version suffix, because parser >

Re: [PATCH v2 0/5] perf-probe: Improve probing on versioned symbols

2017-12-07 Thread Ravi Bangoria
tml) > > The first version is here; https://lkml.org/lkml/2017/12/5/1124 > > Here is the updates; > > [3/5] Add a description in Documentation/perf-probe.txt > [5/5] Add a description and examples in Documentation/perf-probe.txt > > Thank you, Ack-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>

[PATCH] powerpc/perf: Dereference bhrb entries safely

2017-12-12 Thread Ravi Bangoria
[c0027964] performance_monitor_exception+0x54/0x70 [c0009ba4] performance_monitor_common+0x114/0x120 Fix this by deferefencing them safely. Suggested-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com&g

[PATCH] perf probe: Restrict user to use only one executable with -V

2017-10-26 Thread Ravi Bangoria
@<fun+0> int arg Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index b7aaf9b..0e04015

[RFC] perf tool: Fix memory corruption because of zero length symbols

2017-10-24 Thread Ravi Bangoria
art', 'offset' becomes 0, which is valid for normal symbols but *invalid* for zero length symbols and thus updating h->addr[offset] causes memory corruption. Fix this by adding one dummy element for zero length symbols. Fixes: edee44be5919 ("perf annotate: Don't throw error for zero leng

Re: [PATCH v3 6/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-07 Thread Ravi Bangoria
Hi Masami, On 05/04/2018 07:51 PM, Ravi Bangoria wrote: > >>> +} >>> + >>> +static void sdt_increment_ref_ctr(struct trace_uprobe *tu) >>> +{ >>> + struct uprobe_map_info *info; >>> + >>> + uprobe_down_write_dup

Re: [PATCH v2 3/3] perf/buildid-cache: Support --purge-all option

2018-05-09 Thread Ravi Bangoria
On 05/08/2018 09:12 PM, Masami Hiramatsu wrote: > On Thu, 3 May 2018 14:24:04 +0530 > Ravi Bangoria <ravi.bango...@linux.ibm.com> wrote: > >> Hi Masami, >> >> On 04/23/2018 12:32 PM, Masami Hiramatsu wrote: >>> On Tue, 17 Apr 2018 09

Re: [PATCH v3 6/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-08 Thread Ravi Bangoria
Hi Masami, On 05/07/2018 09:26 PM, Masami Hiramatsu wrote: > On Mon, 7 May 2018 13:51:21 +0530 > Ravi Bangoria <ravi.bango...@linux.ibm.com> wrote: > >> Hi Masami, >> >> On 05/04/2018 07:51 PM, Ravi Bangoria wrote: >>>>> +} >>>>> + &

[PATCH] perf buildid-cache: Warn --purge-all failures

2018-05-09 Thread Ravi Bangoria
Warn perf buildid-cache --purge-all failures in non verbose mode. Ex, $ sudo chown root:root /home/ravi/.debug -R $ ./perf buildid-cache -P Error: Permission denied. Suggested-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com>

[PATCH v2] perf buildid-cache: Warn --purge-all failures

2018-05-09 Thread Ravi Bangoria
org> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> --- tools/perf/builtin-buildid-cache.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 7a7403913b57..ef6b3cc8d57d 100644

Re: [PATCH v3 6/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-04 Thread Ravi Bangoria
Hi Masami, On 05/04/2018 10:18 AM, Masami Hiramatsu wrote: >> +void uprobe_down_write_dup_mmap(void) >> +{ >> +percpu_down_write(_mmap_sem); >> +} >> + >> +void uprobe_up_write_dup_mmap(void) >> +{ >> +percpu_up_write(_mmap_sem); >> +} >> + > I'm not sure why these hunks are not done in

Re: [PATCH 1/2] perf script: Show virtual addresses instead of offsets

2018-05-17 Thread Ravi Bangoria
Arnaldo, We already have a binary offset handy in perf code but there is no way to dump it with perf script. We can derive it from symname+symoff but that's a manual work. Will it be good to have a '-F binoff' option? Ravi On 05/18/2018 01:29 AM, Arnaldo Carvalho de Melo wrote: > Em Thu, May

Re: [PATCH v3 6/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-05-25 Thread Ravi Bangoria
Thanks Oleg for the review, On 05/24/2018 09:56 PM, Oleg Nesterov wrote: > On 04/17, Ravi Bangoria wrote: >> >> @@ -941,6 +1091,9 @@ typedef bool (*filter_func_t)(struct uprobe_consumer >> *self, >> if (ret) >> goto err_buffer; &g

[RFC] powerpc/emulate_step: Fix kernel crash when VSX is not present

2018-05-15 Thread Ravi Bangoria
: stvx : PASS emulate_step_test: lxvd2x : FAIL emulate_step_test: stxvd2x: FAIL Fixes: https://github.com/linuxppc/linux/issues/148 Reported-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> --- Note: V

[PATCH 3/3] powerpc/sstep: Fix emulate_step test if VSX not present

2018-05-20 Thread Ravi Bangoria
: lxvd2x : PASS (!CPU_FTR_VSX) emulate_step_test: stxvd2x: PASS (!CPU_FTR_VSX) Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> --- arch/powerpc/lib/test_emulate_step.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/arch/p

[PATCH 1/3] powerpc/sstep: Introduce GETTYPE macro

2018-05-20 Thread Ravi Bangoria
Replace 'op->type & INSTR_TYPE_MASK' expression with GETTYPE(op->type) macro. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> --- arch/powerpc/include/asm/sstep.h | 2 ++ arch/powerpc/kernel/align.c | 2 +- arch/powerpc/lib/sstep.c | 6 +++--- 3

[PATCH 2/3] powerpc/sstep: Fix kernel crash if VSX is not present

2018-05-20 Thread Ravi Bangoria
Reported-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> --- arch/powerpc/lib/sstep.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index db6bba259d91..23b7ddf

[PATCH 0/3] powerpc/sstep: Fix kernel crash if VSX is not present

2018-05-20 Thread Ravi Bangoria
a new macro to simplify code a bit. 2nd patch fixes the kernel crash when VSX is not supported or disabled. 3rd patch fixes emulate_step() tests Ravi Bangoria (3): powerpc/sstep: Introduce GETTYPE macro powerpc/sstep: Fix kernel crash if VSX is not present powerpc/sstep: Fix emulate_step

Re: [PATCH] perf report powerpc: Fix crash if callchain is empty

2018-06-11 Thread Ravi Bangoria
libc-2.26.so > +8.83% _init+236 [.] _initls > ... > > Reported-by: Ravi Bangoria > Signed-off-by: Sandipan Das Acked-by: Ravi Bangoria

Re: [PATCH 0/7] Uprobes: Support SDT markers having reference count (semaphore)

2018-06-10 Thread Ravi Bangoria
Hi Oleg, On 06/08/2018 10:06 PM, Oleg Nesterov wrote: > Hello, > > I am travelling till the end of the next week, can't read this version > until I return. Just one question, > > On 06/06, Ravi Bangoria wrote: >> >> 1. One of the major reason was the deadlock

Re: [PATCH 0/7] Uprobes: Support SDT markers having reference count (semaphore)

2018-06-10 Thread Ravi Bangoria
Hi Masami, >>> Hmm, it sounds simple... maybe we can increment refctr in >>> install_breakpoint/ >>> remove_breakpoint? >> >> Not really, it would be simpler if I can put it inside install_breakpoint(). >> Consider an mmap() case. Probed instruction resides in the text section >> whereas >>

[PATCH] perf script powerpc: Python script for hypervisor call statistics

2018-06-05 Thread Ravi Bangoria
2600 H_SEND_CRQ 77 1762 7240 2447 Signed-off-by: Ravi Bangoria --- .../perf/scripts/python/bin/powerpc-hcalls-record | 2 + .../perf/scripts/python/bin/powerpc-hcalls-report | 2 + tools/perf/scripts/python/powerpc-hcalls.py

[PATCH 0/7] Uprobes: Support SDT markers having reference count (semaphore)

2018-06-06 Thread Ravi Bangoria
correctness issue. I'm working on a fix for this. [1] https://lkml.org/lkml/2018/4/17/23 [2] https://lkml.org/lkml/2018/5/25/111 [3] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation [4] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506 Ravi Bangoria (7

Re: [PATCH 42/46] perf script powerpc: Python script for hypervisor call statistics

2018-06-06 Thread Ravi Bangoria
Hi Paul, On 06/06/2018 08:23 PM, Paul Clarke wrote: > On 06/05/2018 12:50 PM, Arnaldo Carvalho de Melo wrote: >> From: Ravi Bangoria >> >> Add python script to show hypervisor call statistics. Ex, >> >> # perf record -a -e "{powerpc:hcall_entry,powe

Re: [PATCH] perf test 39 (Session topology) dumps core on s390

2018-05-27 Thread Ravi Bangoria
Hi Thomas, On 05/24/2018 07:26 PM, Thomas Richter wrote: > @@ -95,7 +98,7 @@ int test__session_topology(struct test *test > __maybe_unused, int subtest __maybe > { > char path[PATH_MAX]; > struct cpu_map *map; > - int ret = -1; > + int ret; This is failing for me:

[PATCH v2 2/3] perf script: Fix crash because of missing evsel->priv

2018-06-25 Thread Ravi Bangoria
ls 2282 1031.73: 25 cpu-clock:uhH: 7effe4b3a650 Signed-off-by: Ravi Bangoria Fixes: a14390fde64e ("perf script: Allow creating per-event dump files") --- tools/perf/builtin-script.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/perf/builtin-script.c

[PATCH v2 3/3] perf script/annotate: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]

2018-06-25 Thread Ravi Bangoria
record -o - ls | ./perf script Segmentation fault (core dumped) After: # ./perf record -o - ls | ./perf script ls 7031 4392.099856: 25 cpu-clock:uhH: 7f5e0ce7cd60 ls 7031 4392.100355: 25 cpu-clock:uhH: 7f5e0c706ef7 Signed-off-by: Ravi Bangoria Fixes: 57b5de463925 ("perf r

[PATCH v2 1/3] perf script: Add missing output fields in a hint

2018-06-25 Thread Ravi Bangoria
Few fields are missing in a perf script -F hint. Add them. Signed-off-by: Ravi Bangoria --- tools/perf/builtin-script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index a31d7082188e..f3fefbcc4503 100644

[PATCH v2 0/3] perf script: Few trivial fixes

2018-06-25 Thread Ravi Bangoria
First patch fixes perf output field hint. Second and third fixes crash when used in a piped mode. v2 changes: - [PATCH 3/3] Changed as suggested by Arnaldo v1: https://lkml.org/lkml/2018/6/20/538 Ravi Bangoria (3): perf script: Add missing output fields in a hint perf script: Fix crash

Re: [PATCH v5 09/10] Uprobes/sdt: Document about reference counter

2018-07-03 Thread Ravi Bangoria
Hi Srikar, On 07/02/2018 08:24 PM, Srikar Dronamraju wrote: > * Ravi Bangoria [2018-06-28 10:52:08]: > >> Reference counter gate the invocation of probe. If present, >> by default reference count is 0. Kernel needs to increment >> it before tracing the probe an

<    1   2   3   4   5   6   7   8   9   10   >