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

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

2018-04-04 Thread Ravi Bangoria
Userspace Statically Defined Tracepoints[1] are dtrace style markers inside userspace applications. These markers are added by developer at important places in the code. Each marker source expands to a single nop instruction in the compiled code but there may be additional overhead for computing th

[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
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 by developer at important places

[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/uprobes.h

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

2018-04-04 Thread 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-by: Jérôme Glisse --- kerne

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

2018-04-04 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 v2 9/9] perf probe: Support SDT markers having reference counter (semaphore)

2018-04-04 Thread 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 buildid-cache --add /tmp/tic

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

2018-04-04 Thread 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 that are going to be mapped

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

2018-04-04 Thread 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 of reference counter. Si

Re: [RFC PATCH 0/3] Documentation/features: Provide and apply "features-refresh.sh"

2018-04-04 Thread Andrea Parri
On Wed, Apr 04, 2018 at 06:56:32AM +0200, Ingo Molnar wrote: > > * Andrea Parri wrote: > > > In Ingo's words [1]: > > > > "[...] what should be done instead is to write a script that refreshes > >all the arch-support.txt files in-place. [...] > > > >It's OK for the script to have va

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

2018-04-04 Thread kbuild test robot
/commits/Ravi-Bangoria/trace_uprobe-Support-SDT-markers-having-reference-count-semaphore/20180404-201900 config: x86_64-randconfig-x019-201813 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All

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

2018-04-04 Thread kbuild test robot
/commits/Ravi-Bangoria/trace_uprobe-Support-SDT-markers-having-reference-count-semaphore/20180404-201900 config: i386-randconfig-a0-201813 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors

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

2018-04-04 Thread kbuild test robot
Hi Ravi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/perf/core] [also build test WARNING on v4.16 next-20180404] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

[RFC PATCH] trace_uprobe: trace_uprobe_mmap() can be static

2018-04-04 Thread kbuild test robot
Fixes: d8d4d3603b92 ("trace_uprobe: Support SDT markers having reference count (semaphore)") Signed-off-by: Fengguang Wu --- trace_uprobe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2502bd7..49a8673 100

Re: [PATCH V2 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support

2018-04-04 Thread Megha Dey
On Wed, 2017-12-20 at 13:23 -0800, Megha Dey wrote: > On Wed, 2017-12-13 at 08:21 +0100, Peter Zijlstra wrote: > > On Tue, Dec 12, 2017 at 03:08:00PM -0800, Megha Dey wrote: > > > > > > > > There's work on the way to allow multiple HW PMUs. You'll either have to > > > > wait for that or help in ma

Re: [PATCH 0/2] perf: riscv: Preliminary Perf Event Support on RISC-V

2018-04-04 Thread Alan Kao
On Tue, Apr 03, 2018 at 03:45:17PM -0700, Palmer Dabbelt wrote: > On Tue, 03 Apr 2018 07:29:02 PDT (-0700), alan...@andestech.com wrote: > >On Mon, Apr 02, 2018 at 08:15:44PM -0700, Palmer Dabbelt wrote: > >>On Mon, 02 Apr 2018 05:31:22 PDT (-0700), alan...@andestech.com wrote: > >>>This implements

Re: [PATCH v2 2/2] perf: riscv: Add Document for Future Porting Guide

2018-04-04 Thread Alan Kao
Hi Alex, On Tue, Apr 03, 2018 at 07:08:43PM -0700, Alex Solomatnikov wrote: > Doc fixes: > > Thanks for these fixes. I'll edit this patch and send a v3 once I am done with the PMU patch. I suppose a "Reviewed-by: Alex Solomatnikov" appending at the end of the commit will be great, right? Alan