[tip:perf/core] perf buildid-cache: Warn --purge-all failures

2018-05-16 Thread tip-bot for Ravi Bangoria
Commit-ID: d8ed87bc171946313b2e6d26e1fec494da9154bc Gitweb: https://git.kernel.org/tip/d8ed87bc171946313b2e6d26e1fec494da9154bc Author: Ravi Bangoria <ravi.bango...@linux.ibm.com> AuthorDate: Thu, 10 May 2018 10:06:51 +0530 Committer: Arnaldo Carvalho de Melo <a...@redhat.com>

[tip:perf/core] perf buildid-cache: Warn --purge-all failures

2018-05-16 Thread tip-bot for Ravi Bangoria
Commit-ID: d8ed87bc171946313b2e6d26e1fec494da9154bc Gitweb: https://git.kernel.org/tip/d8ed87bc171946313b2e6d26e1fec494da9154bc Author: Ravi Bangoria AuthorDate: Thu, 10 May 2018 10:06:51 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 15 May 2018 10:32:16 -0300 perf

[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

[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 Signed-off-by: Ravi Bangoria --- Note: VSX was first introduced on P6. But there are many VSX

[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

[PATCH v2] 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 $ sudo chmod 700 /home/ravi/.debug/ -R $ ./perf buildid-cache -P Couldn't remove some caches. Error: Permission denied. Suggested-by: Masami Hiramatsu Signed-off-by: Ravi

[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] 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 Signed-off-by: Ravi Bangoria --- tools/perf/builtin-buildid-cache.c | 8 ++-- 1 file

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 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 wrote: > >> Hi Masami, >> >> On 04/23/2018 12:32 PM, Masami Hiramatsu wrote: >>> On Tue, 17 Apr 2018 09:43:46 +0530 >>> Ravi Bangoria wrote: >>

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: >>>>> +} >>>>> + &

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 wrote: > >> Hi Masami, >> >> On 05/04/2018 07:51 PM, Ravi Bangoria wrote: >>>>> +} >>>>> + >>>>> +static voi

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 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 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 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 v2 3/3] perf/buildid-cache: Support --purge-all option

2018-05-03 Thread Ravi Bangoria
Hi Masami, On 04/23/2018 12:32 PM, Masami Hiramatsu wrote: > On Tue, 17 Apr 2018 09:43:46 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> +pr_debug("Purged all: %s\n", err ? "FAIL" : "Ok"); > Hmm, I think this s

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

2018-05-03 Thread Ravi Bangoria
Hi Masami, On 04/23/2018 12:32 PM, Masami Hiramatsu wrote: > On Tue, 17 Apr 2018 09:43:46 +0530 > Ravi Bangoria wrote: > >> +pr_debug("Purged all: %s\n", err ? "FAIL" : "Ok"); > Hmm, I think this should use pr_info(or pr_warning), at least

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

2018-05-03 Thread Ravi Bangoria
On 04/17/2018 10:02 AM, Ravi Bangoria wrote: > Userspace Statically Defined Tracepoints[1] are dtrace style markers > inside userspace applications. Applications like PostgreSQL, MySQL, > Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc > have these markers embe

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

2018-05-03 Thread Ravi Bangoria
On 04/17/2018 10:02 AM, Ravi Bangoria wrote: > Userspace Statically Defined Tracepoints[1] are dtrace style markers > inside userspace applications. Applications like PostgreSQL, MySQL, > Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc > have these markers embe

[tip:perf/core] perf buildid-cache: Support --purge-all option

2018-05-02 Thread tip-bot for Ravi Bangoria
Commit-ID: 9a73c308542bea74df921e9bb9fb07d39bbf2cfa Gitweb: https://git.kernel.org/tip/9a73c308542bea74df921e9bb9fb07d39bbf2cfa Author: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> AuthorDate: Tue, 17 Apr 2018 09:43:46 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] perf buildid-cache: Support --purge-all option

2018-05-02 Thread tip-bot for Ravi Bangoria
Commit-ID: 9a73c308542bea74df921e9bb9fb07d39bbf2cfa Gitweb: https://git.kernel.org/tip/9a73c308542bea74df921e9bb9fb07d39bbf2cfa Author: Ravi Bangoria AuthorDate: Tue, 17 Apr 2018 09:43:46 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Apr 2018 09:30:26 -0300 perf

[tip:perf/core] perf buildid-cache: Support --list option

2018-05-02 Thread tip-bot for Ravi Bangoria
Commit-ID: 8e1e0d74672f84e6c4b1e26ce2bb2e529aaf8676 Gitweb: https://git.kernel.org/tip/8e1e0d74672f84e6c4b1e26ce2bb2e529aaf8676 Author: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> AuthorDate: Tue, 17 Apr 2018 09:43:45 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] perf buildid-cache: Support --list option

2018-05-02 Thread tip-bot for Ravi Bangoria
Commit-ID: 8e1e0d74672f84e6c4b1e26ce2bb2e529aaf8676 Gitweb: https://git.kernel.org/tip/8e1e0d74672f84e6c4b1e26ce2bb2e529aaf8676 Author: Ravi Bangoria AuthorDate: Tue, 17 Apr 2018 09:43:45 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Apr 2018 09:30:26 -0300 perf

[tip:perf/urgent] perf tools: Add '\n' at the end of parse-options error messages

2018-04-21 Thread tip-bot for Ravi Bangoria
Commit-ID: 66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Gitweb: https://git.kernel.org/tip/66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Author: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> AuthorDate: Tue, 17 Apr 2018 09:43:44 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/urgent] perf tools: Add '\n' at the end of parse-options error messages

2018-04-21 Thread tip-bot for Ravi Bangoria
Commit-ID: 66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Gitweb: https://git.kernel.org/tip/66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Author: Ravi Bangoria AuthorDate: Tue, 17 Apr 2018 09:43:44 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 18 Apr 2018 15:35:51 -0300 perf tools

[RFC] trace_events: Fix kernel crash while using empty filter with perf

2018-04-20 Thread Ravi Bangoria
ter logic to be simpler and faster"). This patch restores the behavior as a side effect: Before patch: # echo "" > filter # After patch: # echo "" > filter bash: echo: write error: Invalid argument # Fixes: 80765597bc58 ("tracing: Rewr

[RFC] trace_events: Fix kernel crash while using empty filter with perf

2018-04-20 Thread Ravi Bangoria
ter logic to be simpler and faster"). This patch restores the behavior as a side effect: Before patch: # echo "" > filter # After patch: # echo "" > filter bash: echo: write error: Invalid argument # Fixes: 80765597bc58 ("tracing: Rewrite fil

Re: [PATCH v2 0/3] perf: Fixes for callchain ip handling on powerpc

2018-04-19 Thread Ravi Bangoria
hen callchain is empty. Looks good. For the series, Tested-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> But there are few other cases, I've mentioned them in detail at the end, which needs to be fixed. Arnaldo, if you are fine, can we push this series and take care of other cases

Re: [PATCH v2 0/3] perf: Fixes for callchain ip handling on powerpc

2018-04-19 Thread Ravi Bangoria
hen callchain is empty. Looks good. For the series, Tested-by: Ravi Bangoria But there are few other cases, I've mentioned them in detail at the end, which needs to be fixed. Arnaldo, if you are fine, can we push this series and take care of other cases later on? No point in stretching this

Re: [PATCH 1/2] perf tools powerpc: Fix callchain ip filtering

2018-04-17 Thread Ravi Bangoria
On 04/12/2018 10:41 PM, Sandipan Das wrote: > For powerpc64, if a probe is added for a function without specifying > a line number, the corresponding trap instruction is placed at offset > 0 (for big endian) or 8 (for little endian) from the start address of > the function. This address is in

Re: [PATCH 1/2] perf tools powerpc: Fix callchain ip filtering

2018-04-17 Thread Ravi Bangoria
On 04/12/2018 10:41 PM, Sandipan Das wrote: > For powerpc64, if a probe is added for a function without specifying > a line number, the corresponding trap instruction is placed at offset > 0 (for big endian) or 8 (for little endian) from the start address of > the function. This address is in

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

2018-04-16 Thread Ravi Bangoria
ceware.org/systemtap/wiki/UserSpaceProbeImplementation [2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506 [3] https://lkml.org/lkml/2017/12/6/976 Oleg Nesterov (1): Uprobe: Move mmput() into free_map_info() Ravi Bangoria (8): Uprobe: Export vaddr <-> offset conversion functions mm:

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

2018-04-16 Thread Ravi Bangoria
ceware.org/systemtap/wiki/UserSpaceProbeImplementation [2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506 [3] https://lkml.org/lkml/2017/12/6/976 Oleg Nesterov (1): Uprobe: Move mmput() into free_map_info() Ravi Bangoria (8): Uprobe: Export vaddr <-> offset conversion functions mm:

[PATCH v3 5/9] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info()

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> Given the file(inode) and offset, build_map_info() finds all existing mm that map the portion of file containing offset. Exporting these functions and data structure will help to use them in other set of files. Signed-off-by: Ravi Ba

[PATCH v3 5/9] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info()

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria Given the file(inode) and offset, build_map_info() finds all existing mm that map the portion of file containing offset. Exporting these functions and data structure will help to use them in other set of files. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse

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

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> Userspace Statically Defined Tracepoints[1] are dtrace style markers inside userspace applications. Applications like PostgreSQL, MySQL, Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc have these markers embedded i

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

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria Userspace Statically Defined Tracepoints[1] are dtrace style markers inside userspace applications. Applications like PostgreSQL, MySQL, Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc have these markers embedded in them. These markers are added

[PATCH v3 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> With this, perf buildid-cache will save SDT markers with reference counter in probe cache. Perf probe will be able to probe markers having reference counter. Ex, # readelf -n /tmp/tick | grep -A1 loop2 Name: loop2 ... Sem

[PATCH v3 8/9] trace_uprobe/sdt: Document about reference counter

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> Reference counter gate the invocation of probe. If present, by default reference count is 0. Kernel needs to increment it before tracing the probe and decrement it when done. This is identical to semaphore in Userspace Statically D

[PATCH v3 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria With this, perf buildid-cache will save SDT markers with reference counter in probe cache. Perf probe will be able to probe markers having reference counter. Ex, # readelf -n /tmp/tick | grep -A1 loop2 Name: loop2 ... Semaphore: 0x10020036 # ./perf

[PATCH v3 8/9] trace_uprobe/sdt: Document about reference counter

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria Reference counter gate the invocation of probe. If present, by default reference count is 0. Kernel needs to increment it before tracing the probe and decrement it when done. This is identical to semaphore in Userspace Statically Defined Tracepoints (USDT). Document usage

[PATCH v3 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> When virtual memory map for binary/library is being prepared, there is no direct one to one mapping between mmap() and virtual memory area. Ex, when loader loads the library, it first calls mmap(size = total_size), where total_size is ad

[PATCH v3 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria When virtual memory map for binary/library is being prepared, there is no direct one to one mapping between mmap() and virtual memory area. Ex, when loader loads the library, it first calls mmap(size = total_size), where total_size is addition of size of all elf sections

[PATCH v3 3/9] Uprobe: Move mmput() into free_map_info()

2018-04-16 Thread Ravi Bangoria
From: Oleg Nesterov <o...@redhat.com> build_map_info() has a side effect like one need to perform mmput() when done with the mm. Add mmput() in free_map_info() so that user does not have to call it explicitly. Signed-off-by: Oleg Nesterov <o...@redhat.com> Signed-off-by: R

[PATCH v3 3/9] Uprobe: Move mmput() into free_map_info()

2018-04-16 Thread Ravi Bangoria
From: Oleg Nesterov build_map_info() has a side effect like one need to perform mmput() when done with the mm. Add mmput() in free_map_info() so that user does not have to call it explicitly. Signed-off-by: Oleg Nesterov Signed-off-by: Ravi Bangoria --- kernel/events/uprobes.c | 9

[PATCH v3 1/9] Uprobe: Export vaddr <-> offset conversion functions

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> These are generic functions which operates on file offset and virtual address. Make these functions available outside of uprobe code so that other can use it as well. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> Reviewe

[PATCH v3 1/9] Uprobe: Export vaddr <-> offset conversion functions

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria These are generic functions which operates on file offset and virtual address. Make these functions available outside of uprobe code so that other can use it as well. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse --- include/linux/mm.h | 12

[PATCH v3 2/9] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> Make function names more meaningful by adding vma_ prefix to them. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.ibm.com> Reviewed-by: Jérôme Glisse <jgli...@redhat.com> --- include/linux/mm.h | 4 ++-- kernel/eve

[PATCH v3 4/9] Uprobe: Rename map_info to uprobe_map_info

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria <ravi.bango...@linux.ibm.com> map_info is very generic name, rename it to uprobe_map_info. Renaming will help to export this structure outside of the file. Also rename free_map_info() to uprobe_free_map_info() and build_map_info() to uprobe_build_map_info(). Sign

[PATCH v3 4/9] Uprobe: Rename map_info to uprobe_map_info

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria map_info is very generic name, rename it to uprobe_map_info. Renaming will help to export this structure outside of the file. Also rename free_map_info() to uprobe_free_map_info() and build_map_info() to uprobe_build_map_info(). Signed-off-by: Ravi Bangoria Reviewed

[PATCH v3 2/9] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-04-16 Thread Ravi Bangoria
From: Ravi Bangoria Make function names more meaningful by adding vma_ prefix to them. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse --- include/linux/mm.h | 4 ++-- kernel/events/uprobes.c | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git

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

2018-04-16 Thread Ravi Bangoria
/a.out ebe71fdcf4b366518cc154d570a33cd461a51c36 /tmp/a.out.1 # perf buildid-cache -P -v Removing /tmp/a.out (8a86ef73e44067bca52cc3f6cd3e5446c783391c): Ok Removing /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36): Ok Purged all: Ok Signed-off-by: Ravi Bangoria <ravi.ba

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

2018-04-16 Thread Ravi Bangoria
/a.out ebe71fdcf4b366518cc154d570a33cd461a51c36 /tmp/a.out.1 # perf buildid-cache -P -v Removing /tmp/a.out (8a86ef73e44067bca52cc3f6cd3e5446c783391c): Ok Removing /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36): Ok Purged all: Ok Signed-off-by: Ravi Bangoria --- tools/perf

[PATCH v2 1/3] tools/parse-options: Add '\n' at the end of error messages

2018-04-16 Thread Ravi Bangoria
Few error messages does not have '\n' at the end and thus next prompt gets printed in the same line. Ex, linux~$ perf buildid-cache -verbose --add ./a.out Error: did you mean `--verbose` (with two dashes ?)linux~$ Fix it. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.

[PATCH v2 0/3] perf/buildid-cache: Add --list and --purge-all options

2018-04-16 Thread Ravi Bangoria
. v1 can be found at: https://lkml.org/lkml/2018/4/9/295 Ravi Bangoria (3): tools/parse-options: Add '\n' at the end of error messages perf/buildid-cache: Support --list option perf/buildid-cache: Support --purge-all option tools/lib/subcmd/parse-options.c| 6 +- tools/perf

[PATCH v2 1/3] tools/parse-options: Add '\n' at the end of error messages

2018-04-16 Thread Ravi Bangoria
Few error messages does not have '\n' at the end and thus next prompt gets printed in the same line. Ex, linux~$ perf buildid-cache -verbose --add ./a.out Error: did you mean `--verbose` (with two dashes ?)linux~$ Fix it. Signed-off-by: Ravi Bangoria Reviewed-by: Masami Hiramatsu

[PATCH v2 0/3] perf/buildid-cache: Add --list and --purge-all options

2018-04-16 Thread Ravi Bangoria
. v1 can be found at: https://lkml.org/lkml/2018/4/9/295 Ravi Bangoria (3): tools/parse-options: Add '\n' at the end of error messages perf/buildid-cache: Support --list option perf/buildid-cache: Support --purge-all option tools/lib/subcmd/parse-options.c| 6 +- tools/perf

[PATCH v2 2/3] perf/buildid-cache: Support --list option

2018-04-16 Thread Ravi Bangoria
-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++- tools/perf/builtin-buildid-cache.c | 43 +++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/tools/perf/Documentation/perf-b

[PATCH v2 2/3] perf/buildid-cache: Support --list option

2018-04-16 Thread Ravi Bangoria
-by: Ravi Bangoria --- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++- tools/perf/builtin-buildid-cache.c | 43 +++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf/Documentation

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

2018-04-16 Thread Ravi Bangoria
Hi Masami, On 04/16/2018 02:57 PM, Masami Hiramatsu wrote: > On Mon, 9 Apr 2018 16:36:33 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> User can remove files from cache using --remove/--purge options >> but both needs list of files as an ar

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

2018-04-16 Thread Ravi Bangoria
Hi Masami, On 04/16/2018 02:57 PM, Masami Hiramatsu wrote: > On Mon, 9 Apr 2018 16:36:33 +0530 > Ravi Bangoria wrote: > >> User can remove files from cache using --remove/--purge options >> but both needs list of files as an argument. It's not convenient >> when y

Re: [PATCH 2/3] perf/buildid-cache: Support --list option

2018-04-16 Thread Ravi Bangoria
Thanks Jiri for the reviews. Will post v2 soon. -Ravi On 04/13/2018 06:28 PM, Jiri Olsa wrote: > On Mon, Apr 09, 2018 at 04:36:32PM +0530, Ravi Bangoria wrote: > > SNIP > >> - !remove_name_list_str && !purge_name_list_str && >

Re: [PATCH 2/3] perf/buildid-cache: Support --list option

2018-04-16 Thread Ravi Bangoria
Thanks Jiri for the reviews. Will post v2 soon. -Ravi On 04/13/2018 06:28 PM, Jiri Olsa wrote: > On Mon, Apr 09, 2018 at 04:36:32PM +0530, Ravi Bangoria wrote: > > SNIP > >> - !remove_name_list_str && !purge_name_list_str && >

Re: [PATCH v2 1/2] trace_uprobe: Use %lx to display offset

2018-04-11 Thread Ravi Bangoria
Hi Steve, Can you please pull these patches. Thanks, Ravi On 03/15/2018 01:57 PM, Ravi Bangoria wrote: > tu->offset is unsigned long, not a pointer, thus %lx should > be used to print it, not the %px. > > Fixes: 0e4d819d0893 ("trace_uprobe: Display correct offset in uprobe_

Re: [PATCH v2 1/2] trace_uprobe: Use %lx to display offset

2018-04-11 Thread Ravi Bangoria
Hi Steve, Can you please pull these patches. Thanks, Ravi On 03/15/2018 01:57 PM, Ravi Bangoria wrote: > tu->offset is unsigned long, not a pointer, thus %lx should > be used to print it, not the %px. > > Fixes: 0e4d819d0893 ("trace_uprobe: Display correct offset in uprobe_

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-10 Thread Ravi Bangoria
Hi Oleg, On 04/10/2018 04:36 PM, Oleg Nesterov wrote: > Hi Ravi, > > On 04/10, Ravi Bangoria wrote: >>> and what if __mmu_notifier_register() fails simply because signal_pending() >>> == T? >>> see mm_take_all_locks(). >>> >>> at first glan

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-10 Thread Ravi Bangoria
Hi Oleg, On 04/10/2018 04:36 PM, Oleg Nesterov wrote: > Hi Ravi, > > On 04/10, Ravi Bangoria wrote: >>> and what if __mmu_notifier_register() fails simply because signal_pending() >>> == T? >>> see mm_take_all_locks(). >>> >>> at first glan

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-10 Thread Ravi Bangoria
Hi Oleg, On 04/09/2018 06:59 PM, Oleg Nesterov wrote: > On 04/04, Ravi Bangoria wrote: >> +static void sdt_add_mm_list(struct trace_uprobe *tu, struct mm_struct *mm) >> +{ >> +struct mmu_notifier *mn; >> +struct sdt_mm_list *sml = kzalloc(sizeof(*sml), GFP_KER

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-10 Thread Ravi Bangoria
Hi Oleg, On 04/09/2018 06:59 PM, Oleg Nesterov wrote: > On 04/04, Ravi Bangoria wrote: >> +static void sdt_add_mm_list(struct trace_uprobe *tu, struct mm_struct *mm) >> +{ >> +struct mmu_notifier *mn; >> +struct sdt_mm_list *sml = kzalloc(sizeof(*sml), GFP_KER

Re: [PATCH v5 0/6] enable creating [k,u]probe with perf_event_open

2018-04-09 Thread Ravi Bangoria
Hi Song, On 12/07/2017 04:15 AM, Song Liu wrote: > With current kernel, user space tools can only create/destroy [k,u]probes > with a text-based API (kprobe_events and uprobe_events in tracefs). This > approach relies on user space to clean up the [k,u]probe after using them. > However, this is

Re: [PATCH v5 0/6] enable creating [k,u]probe with perf_event_open

2018-04-09 Thread Ravi Bangoria
Hi Song, On 12/07/2017 04:15 AM, Song Liu wrote: > With current kernel, user space tools can only create/destroy [k,u]probes > with a text-based API (kprobe_events and uprobe_events in tracefs). This > approach relies on user space to clean up the [k,u]probe after using them. > However, this is

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-09 Thread Ravi Bangoria
On 04/09/2018 07:02 PM, Ravi Bangoria wrote: > Hi Oleg, > > On 04/09/2018 06:47 PM, Oleg Nesterov wrote: >> I didn't read this version yet, just one question... >> >> So now it depends on CONFIG_MMU_NOTIFIER, yes? I do not see any changes in >> Kconfig >>

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-09 Thread Ravi Bangoria
On 04/09/2018 07:02 PM, Ravi Bangoria wrote: > Hi Oleg, > > On 04/09/2018 06:47 PM, Oleg Nesterov wrote: >> I didn't read this version yet, just one question... >> >> So now it depends on CONFIG_MMU_NOTIFIER, yes? I do not see any changes in >> Kconfig >>

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-09 Thread Ravi Bangoria
Hi Oleg, On 04/09/2018 06:47 PM, Oleg Nesterov wrote: > On 04/04, Ravi Bangoria wrote: >> +static void sdt_add_mm_list(struct trace_uprobe *tu, struct mm_struct *mm) >> +{ >> +struct mmu_notifier *mn; >> +struct sdt_mm_list *sml = kzalloc(sizeof(*sml), GFP_KER

Re: [PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-09 Thread Ravi Bangoria
Hi Oleg, On 04/09/2018 06:47 PM, Oleg Nesterov wrote: > On 04/04, Ravi Bangoria wrote: >> +static void sdt_add_mm_list(struct trace_uprobe *tu, struct mm_struct *mm) >> +{ >> +struct mmu_notifier *mn; >> +struct sdt_mm_list *sml = kzalloc(sizeof(*sml), GFP_KER

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

2018-04-09 Thread Ravi Bangoria
(8a86ef73e44067bca52cc3f6cd3e5446c783391c) /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36) # perf buildid-cache -P -v Removing /tmp/a.out (8a86ef73e44067bca52cc3f6cd3e5446c783391c): Ok Removing /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36): Ok Purged all: Ok Signed-off-by: Ravi Bangoria <ravi.ba

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

2018-04-09 Thread Ravi Bangoria
(8a86ef73e44067bca52cc3f6cd3e5446c783391c) /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36) # perf buildid-cache -P -v Removing /tmp/a.out (8a86ef73e44067bca52cc3f6cd3e5446c783391c): Ok Removing /tmp/a.out.1 (ebe71fdcf4b366518cc154d570a33cd461a51c36): Ok Purged all: Ok Signed-off-by: Ravi Bangoria --- tools

[PATCH 2/3] perf/buildid-cache: Support --list option

2018-04-09 Thread Ravi Bangoria
-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++- tools/perf/builtin-buildid-cache.c | 41 +++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/tools/perf/Documentation/perf-b

[PATCH 2/3] perf/buildid-cache: Support --list option

2018-04-09 Thread Ravi Bangoria
-by: Ravi Bangoria --- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++- tools/perf/builtin-buildid-cache.c | 41 +++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf

[PATCH 1/3] tools/parse-options: Add '\n' at the end of error messages

2018-04-09 Thread Ravi Bangoria
Few error messages does not have '\n' at the end and thus next prompt gets printed in the same line. Ex, linux~$ perf buildid-cache -verbose --add ./a.out Error: did you mean `--verbose` (with two dashes ?)linux~$ Fix it. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.

[PATCH 1/3] tools/parse-options: Add '\n' at the end of error messages

2018-04-09 Thread Ravi Bangoria
Few error messages does not have '\n' at the end and thus next prompt gets printed in the same line. Ex, linux~$ perf buildid-cache -verbose --add ./a.out Error: did you mean `--verbose` (with two dashes ?)linux~$ Fix it. Signed-off-by: Ravi Bangoria --- tools/lib/subcmd/parse-options.c

[PATCH 0/3] perf/buildid-cache: Add --list and --purge-all options

2018-04-09 Thread Ravi Bangoria
First patch is a trivial error message fix. Second and third adds new options --list and --purge-all to 'buildid-cache' subcommand. Ravi Bangoria (3): tools/parse-options: Add '\n' at the end of error messages perf/buildid-cache: Support --list option perf/buildid-cache: Support --purge-all

[PATCH 0/3] perf/buildid-cache: Add --list and --purge-all options

2018-04-09 Thread Ravi Bangoria
First patch is a trivial error message fix. Second and third adds new options --list and --purge-all to 'buildid-cache' subcommand. Ravi Bangoria (3): tools/parse-options: Add '\n' at the end of error messages perf/buildid-cache: Support --list option perf/buildid-cache: Support --purge-all

Re: [PATCH v2 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-09 Thread Ravi Bangoria
Hi Masami, On 04/09/2018 12:58 PM, Masami Hiramatsu wrote: > Hi Ravi, > > On Wed, 4 Apr 2018 14:01:10 +0530 > Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote: > >> @@ -2054,15 +2060,21 @@ char *synthesize_probe_trace_command(struct >> probe_trace_event *t

Re: [PATCH v2 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-09 Thread Ravi Bangoria
Hi Masami, On 04/09/2018 12:58 PM, Masami Hiramatsu wrote: > Hi Ravi, > > On Wed, 4 Apr 2018 14:01:10 +0530 > Ravi Bangoria wrote: > >> @@ -2054,15 +2060,21 @@ char *synthesize_probe_trace_command(struct >> probe_trace_event *tev) >> } >> >

[PATCH v2 5/9] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info()

2018-04-04 Thread Ravi Bangoria
Given the file(inode) and offset, build_map_info() finds all existing mm that map the portion of file containing offset. Exporting these functions and data structure will help to use them in other set of files. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Reviewed-by:

[PATCH v2 5/9] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info()

2018-04-04 Thread Ravi Bangoria
Given the file(inode) and offset, build_map_info() finds all existing mm that map the portion of file containing offset. Exporting these functions and data structure will help to use them in other set of files. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse --- include/linux

[PATCH v2 2/9] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-04-04 Thread Ravi Bangoria
Make function names more meaningful by adding vma_ prefix to them. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Reviewed-by: Jérôme Glisse <jgli...@redhat.com> --- include/linux/mm.h | 4 ++-- kernel/events/uprobes.c | 14 +++--- 2 files changed,

[PATCH v2 2/9] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-04-04 Thread Ravi Bangoria
Make function names more meaningful by adding vma_ prefix to them. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse --- include/linux/mm.h | 4 ++-- kernel/events/uprobes.c | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/mm.h b

[PATCH v2 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-04 Thread Ravi Bangoria
/tick # ./perf probe sdt_tick:loop2 # ./perf stat -e sdt_tick:loop2 /tmp/tick hi: 0 hi: 1 hi: 2 ^C Performance counter stats for '/tmp/tick': 3 sdt_tick:loop2 2.561851452 seconds time elapsed Signed-off-by: Ravi Bangoria <ravi.ba

[PATCH v2 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-04 Thread Ravi Bangoria
/tick # ./perf probe sdt_tick:loop2 # ./perf stat -e sdt_tick:loop2 /tmp/tick hi: 0 hi: 1 hi: 2 ^C Performance counter stats for '/tmp/tick': 3 sdt_tick:loop2 2.561851452 seconds time elapsed Signed-off-by: Ravi Bangoria --- tools/perf/util/probe

[PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-04 Thread Ravi Bangoria
bb99d8 )) 2>/dev/null | xxd 000: 00 . Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- kernel/trace/trace_uprobe.c | 105 ++-- 1 file changed, 102 insertions(+), 3 deletions(-) diff

[PATCH v2 7/9] trace_uprobe/sdt: Fix multiple update of same reference counter

2018-04-04 Thread Ravi Bangoria
bb99d8 )) 2>/dev/null | xxd 000: 00 . Signed-off-by: Ravi Bangoria --- kernel/trace/trace_uprobe.c | 105 ++-- 1 file changed, 102 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/ke

[PATCH v2 1/9] Uprobe: Export vaddr <-> offset conversion functions

2018-04-04 Thread Ravi Bangoria
These are generic functions which operates on file offset and virtual address. Make these functions available outside of uprobe code so that other can use it as well. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> Reviewed-by: Jérôme Glisse <jgli...@redhat.com> --- i

[PATCH v2 8/9] trace_uprobe/sdt: Document about reference counter

2018-04-04 Thread Ravi Bangoria
. Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> --- Documentation/trace/uprobetracer.txt | 16 +--- kernel/trace/trace.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/uprobetracer.txt b/Documentation

[PATCH v2 8/9] trace_uprobe/sdt: Document about reference counter

2018-04-04 Thread Ravi Bangoria
. Signed-off-by: Ravi Bangoria --- Documentation/trace/uprobetracer.txt | 16 +--- kernel/trace/trace.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/uprobetracer.txt b/Documentation/trace/uprobetracer.txt index bf526a7c

[PATCH v2 1/9] Uprobe: Export vaddr <-> offset conversion functions

2018-04-04 Thread Ravi Bangoria
These are generic functions which operates on file offset and virtual address. Make these functions available outside of uprobe code so that other can use it as well. Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse --- include/linux/mm.h | 12 kernel/events/uprobes.c

[PATCH v2 0/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-04-04 Thread Ravi Bangoria
can be found at: https://lkml.org/lkml/2018/3/13/432 [1] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation [2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506 [3] https://lkml.org/lkml/2017/12/6/976 Oleg Nesterov (1): Uprobe: Move mmput() into free_map_info() Ra

[PATCH v2 0/9] trace_uprobe: Support SDT markers having reference count (semaphore)

2018-04-04 Thread Ravi Bangoria
can be found at: https://lkml.org/lkml/2018/3/13/432 [1] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation [2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506 [3] https://lkml.org/lkml/2017/12/6/976 Oleg Nesterov (1): Uprobe: Move mmput() into free_map_info() Ra

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