On 03/14/2018 10:29 PM, Oleg Nesterov wrote:
> On 03/13, Ravi Bangoria wrote:
>> +static bool sdt_valid_vma(struct trace_uprobe *tu, struct vm_area_struct
>> *vma)
>> +{
>> +unsigned long vaddr = vma_offset_to_vaddr(vma, tu->ref_ctr_offset);
>>
On 03/15/2018 12:53 PM, Masami Hiramatsu wrote:
>
> Sorry, that is too complicated than enough. you should try to specify a[0]
> instead of a.
>
> $ sudo ./perf probe -x ~/hello foo1 'a=a[0]:x32[3]'
Cool.. that works fine.
$ sudo ./perf script
hello 1779 [034] 76.081971:
Simplify probes_seq_show() function. No change in output
before and after patch.
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
---
kernel/trace/trace_uprobe.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/kernel/trace/trace_up
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_events")
Suggested-by: Kees Cook <keesc...@chromium.org>
Signed-off-by: Ravi Bangoria <ravi.bango...@linu
On 03/06/2018 05:29 PM, Peter Zijlstra wrote:
> On Wed, Feb 28, 2018 at 01:23:44PM +0530, Ravi Bangoria wrote:
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside userspace applications. These markers are added by developer at
>> important pla
Hi Masami,
On 03/14/2018 07:18 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> On Tue, 13 Mar 2018 18:26:00 +0530
> Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote:
>
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside user
On 03/14/2018 07:20 PM, Masami Hiramatsu wrote:
> On Tue, 13 Mar 2018 18:26:03 +0530
> Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote:
>
>> No functionality changes.
> Please consider to describe what is this change and why, here.
Will add in next version.
On 03/14/2018 07:39 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> This code logic looks good. I just have several small comments for style.
>
> On Tue, 13 Mar 2018 18:26:02 +0530
> Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote:
>
>> diff --git a/tools/per
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
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
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
-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
(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
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.
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
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
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
>>
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_
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
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
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
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 &&
>
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
-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
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.
.
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
/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
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
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
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
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
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
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
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
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
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
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:
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
sed for any synchronization. So we are referring it as 'reference
counter' in kernel / perf code.
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
[Fengguang reported/fixed build failure in RFC patch]
---
include/
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 <ravi.bango...@linux.vnet.ibm.
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
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
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
/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
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
.
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
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:
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,
On 03/16/2018 05:42 PM, Ravi Bangoria wrote:
>
> On 03/15/2018 08:19 PM, Oleg Nesterov wrote:
>> On 03/13, Ravi Bangoria wrote:
>>> For tiny binaries/libraries, different mmap regions points to the
>>> same file portion. In such cases, we may increment refere
On 03/15/2018 08:19 PM, Oleg Nesterov wrote:
> On 03/13, Ravi Bangoria wrote:
>> For tiny binaries/libraries, different mmap regions points to the
>> same file portion. In such cases, we may increment reference counter
>> multiple times.
> Yes,
>
>> But while d
Hi Masami :)
On 03/22/2018 03:53 PM, Masami Hiramatsu wrote:
> On Mon, 19 Mar 2018 13:29:59 +0530
> Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote:
>
>>
>> Is it okay to allow user to specify array size with type field?
> Fro this patch, yes.
So IIU
Hi Masami,
On 03/17/2018 06:23 PM, Masami Hiramatsu wrote:
> Since kprobes events support an array argument, perf-probe
> can also support dumping array now.
> The syntax are
>
> []
> or
> []
>
> where the is ... e.g. array[0..5].
> This can also be available with string type. In this
> case,
Hi Oleg,
On 03/14/2018 10:29 PM, Oleg Nesterov wrote:
> On 03/13, Ravi Bangoria wrote:
>> +static bool sdt_valid_vma(struct trace_uprobe *tu, struct vm_area_struct
>> *vma)
>> +{
>> +unsigned long vaddr = vma_offset_to_vaddr(vma, tu->ref_ctr_offset);
>>
On 03/16/2018 05:09 PM, Oleg Nesterov wrote:
> On 03/16, Ravi Bangoria wrote:
>> On 03/15/2018 08:00 PM, Oleg Nesterov wrote:
>>> Note to mention that sdt_find_vma() can return NULL but the callers do
>>> vma_offset_to_vaddr(vma) without any check.
>> If the &q
Hi Oleg,
On 03/16/2018 11:20 PM, Oleg Nesterov wrote:
> On 03/16, Ravi Bangoria wrote:
>> On 03/15/2018 08:19 PM, Oleg Nesterov wrote:
>>> On 03/13, Ravi Bangoria wrote:
>>>> For tiny binaries/libraries, different mmap regions points to the
>>>> same fil
On 03/01/2018 07:37 PM, Masami Hiramatsu wrote:
> On Wed, 28 Feb 2018 13:23:44 +0530
> Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> wrote:
>
>> @@ -502,6 +504,16 @@ static int create_trace_uprobe(int argc, char **argv)
>> for (i = 0; i <
These functions and data structures will be used by other files
in later patches.
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
---
include/linux/uprobes.h | 23 +++
kernel/events/uprobes.c | 20 ++--
2 files changed, 29 insertions(
map_info is very generic name, rename it to uprobe_map_info.
Renaming will help to export this structure outside of the
file.
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
---
kernel/events/uprobes.c | 32 +---
1 file changed, 17 insertions(
ho 0 > events/sdt_tick/loop2/enable
# dd if=/proc//mem bs=1 count=1 skip=268566582 2>/dev/null | xxd
000: 00 .
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
---
kernel/trace/trace_uprobe.c | 105
ent the semaphore if corresponding uprobe is enabled.
At the time of disabling probes, decrement semaphore in all existing
target processes.
Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com>
---
include/linux/uprobes.h | 2 +
kernel/events/uprobes.c | 5 ++
ker
ps://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
[2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506
[3] https://lkml.org/lkml/2017/12/6/976
Ravi Bangoria (4):
Uprobe: Rename map_info to uprobe_map_info
Uprobe: Export few functions / data structures
trace_uprob
On 02/08/2018 09:13 AM, Ravi Bangoria wrote:
>
> On 02/08/2018 08:59 AM, Kees Cook wrote:
>> On Tue, Feb 6, 2018 at 8:34 PM, Ravi Bangoria
>> <ravi.bango...@linux.vnet.ibm.com> wrote:
>>> Simplify probes_seq_show() function. We are using %lx to display
&g
Hello Darrick,
Lockdep is reporting a deadlock with following trace. Saw this on my
powerpc vm with 4GB of ram, running Linus/master kernel. Though, I
don't have exact testcase to reproduce it. Is this something known?
[ 1797.620389] ==
[
a802a79469 ("perf stat: Get rid of extra clock display function")
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index f0a8cec55c47..3c22c58b3e9
().
Reported-by: syzbot+cb1fb754b771caca0...@syzkaller.appspotmail.com
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 96fb51f3994f..e527c4753d4f 100644
--- a/kernel/events/uprobes.c
+++ b
Hi Oleg,
On 11/14/18 9:36 PM, Oleg Nesterov wrote:
> On 11/14, Ravi Bangoria wrote:
>>
>> syzbot reported a kernel crash with delayed_uprobe_remove():
>> https://lkml.org/lkml/2018/11/1/1244
>>
>> Backtrace mentioned in the link points to a race between proc
is results in a sightly different
values of shadow stats.
Reported-by: Anton Blanchard
Fixes: 0aa802a79469 ("perf stat: Get rid of extra clock display function")
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 13 +++--
tools/perf/util/stat.h| 2 +-
2 files c
We already have function to check if a given event is either
SW_CPU_CLOCK or SW_TASK_CLOCK. Utilize it.
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat
Hi Milian,
Seems this has a regression:
With acme/perf/urgent:
$ ./perf record -e cycles:u --call-graph=dwarf ls
$ ./perf script
ls 13585 602082.534478: 28032 cycles:u:
1f1f4 __GI___tunables_init+0xd3dc00a4
(/usr/lib64/ld-2.26.so)
447feb3 gaih_inet.constprop.7+0xf43 (/usr/lib64/libc-2.26.so)
7fff94480a13 __GI_getaddrinfo+0x163 (inlined)
13c752d6f _init+0xbfb (/usr/bin/ping)
7fff9439371f generic_start_main.isra.0+0x13f
(/usr/lib64/libc-2.26.so)
7fff9439391b __libc_start_main+0xbb (/usr/lib64/libc-2.26.so)
LGTM.
Tested-by: Ravi Bangoria
Hi Song,
On 09/25/2018 03:55 AM, Song Liu wrote:
> This patch tries to enable PMU sharing. To make perf event scheduling
> fast, we use special data structures.
>
> An array of "struct perf_event_dup" is added to the perf_event_context,
> to remember all the duplicated events under this ctx. All
Hi Thomas,
On 09/28/2018 03:32 PM, Thomas-Mich Richter wrote:
> I can rework the patch to use the is_supported() member function. The
> down side is that the test does not show up in the list of executed tests
> anymore,
> unless some debug output is enabled:
Which should be fine because s390
Hi Thomas,
On 09/28/2018 01:13 PM, Thomas Richter wrote:
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 54ca7d87236f..e83c15a95c43 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -124,7 +124,7 @@ static struct
ort to avoid these tests being executed on
> s390 platform:
>
> [root@s8360046 perf]# ./perf test 22
> [root@s8360046 perf]# ./perf test -v 22
> 22: Watchpoint: Disabled
> [root@s8360046 perf]#
>
> Signed-off-by: Thomas Richter
Acked-by: Ravi Bangoria
Thanks,
Ravi
Hi Steve,
Please pull this patch.
Thanks.
On 11/15/18 6:13 PM, Oleg Nesterov wrote:
> On 11/15, Ravi Bangoria wrote:
>>
>> There could be a race between task exit and probe unregister:
>>
>> exit_mm()
>> mmput()
>> __mmput() upro
...@syzkaller.appspotmail.com
Fixes: 1cc33161a83d ("uprobes: Support SDT markers having reference count
(semaphore)")
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 32
On 11/16/18 7:05 PM, Jiri Olsa wrote:
> On Fri, Nov 16, 2018 at 09:58:43AM +0530, Ravi Bangoria wrote:
>> Commit 0aa802a79469 ("perf stat: Get rid of extra clock display
>> function") introduced scale and unit for clock events. Thus,
>> perf_stat__update_shadow_
On 02/28/2018 05:36 PM, Srikar Dronamraju wrote:
> * Ravi Bangoria [2018-02-28 13:23:41]:
>
>> # readelf -n ./tick
>> Provider: tick
>> Name: loop2
>> ... Semaphore: 0x10020036
>>
>> # readelf -SW ./tick | grep p
On 02/28/2018 05:39 PM, Srikar Dronamraju wrote:
>> -static inline struct map_info *free_map_info(struct map_info *info)
>> +static inline struct uprobe_map_info *
>> +free_uprobe_map_info(struct uprobe_map_info *info)
>> {
>> -struct map_info *next = info->next;
>> +struct
On 02/28/2018 05:54 PM, Srikar Dronamraju wrote:
>> @@ -149,6 +155,11 @@ struct uprobes_state {
>> extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs
>> *regs);
>> extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
>>
On 02/28/2018 07:55 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> Thank you for your great work!
Thanks Masami.
> On Wed, 28 Feb 2018 13:23:41 +0530
> Ravi Bangoria wrote:
>
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside userspa
On 03/01/2018 07:37 PM, Masami Hiramatsu wrote:
> On Wed, 28 Feb 2018 13:23:44 +0530
> Ravi Bangoria wrote:
>
>> @@ -502,6 +504,16 @@ static int create_trace_uprobe(int argc, char **argv)
>> for (i = 0; i < argc && i < MAX_TRACE_ARGS; i++) {
>
Hi Masami,
On 03/14/2018 07:18 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> On Tue, 13 Mar 2018 18:26:00 +0530
> Ravi Bangoria wrote:
>
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside userspace applications. These markers are added b
On 03/14/2018 07:45 PM, Masami Hiramatsu wrote:
> On Tue, 13 Mar 2018 18:26:01 +0530
> Ravi Bangoria wrote:
>
>> For tiny binaries/libraries, different mmap regions points to the
>> same file portion. In such cases, we may increment reference counter
>> multiple times
On 03/14/2018 07:39 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> This code logic looks good. I just have several small comments for style.
>
> On Tue, 13 Mar 2018 18:26:02 +0530
> Ravi Bangoria wrote:
>
>> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/pro
On 03/14/2018 07:20 PM, Masami Hiramatsu wrote:
> On Tue, 13 Mar 2018 18:26:03 +0530
> Ravi Bangoria wrote:
>
>> No functionality changes.
> Please consider to describe what is this change and why, here.
Will add in next version.
>> Signed-off-by: Ravi Bangoria
>&g
Hi Masami,
On 03/08/2018 02:20 PM, Masami Hiramatsu wrote:
> Add array type support for probe events.
> This allows user to get arraied types from memory address.
> The array type syntax is
>
> TYPE[N]
>
> Where TYPE is one of types (u8/16/32/64,s8/16/32/64,
> x8/16/32/64, symbol, string)
On 03/15/2018 12:53 PM, Masami Hiramatsu wrote:
>
> Sorry, that is too complicated than enough. you should try to specify a[0]
> instead of a.
>
> $ sudo ./perf probe -x ~/hello foo1 'a=a[0]:x32[3]'
Cool.. that works fine.
$ sudo ./perf script
hello 1779 [034] 76.081971:
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_events")
Suggested-by: Kees Cook
Signed-off-by: Ravi Bangoria
---
v2 changelog:
- Keep prefixed 0s as is.
Simplify probes_seq_show() function. No change in output
before and after patch.
Signed-off-by: Ravi Bangoria
---
kernel/trace/trace_uprobe.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
On 03/14/2018 10:29 PM, Oleg Nesterov wrote:
> On 03/13, Ravi Bangoria wrote:
>> +static bool sdt_valid_vma(struct trace_uprobe *tu, struct vm_area_struct
>> *vma)
>> +{
>> +unsigned long vaddr = vma_offset_to_vaddr(vma, tu->ref_ctr_offset);
>>
No functionality changes.
Signed-off-by: Ravi Bangoria
---
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/include/linux/mm.h
index 95909f2..d7ee526 100644
--- a/include/linux
No functionality changes.
Signed-off-by: Ravi Bangoria
---
include/linux/mm.h | 12
kernel/events/uprobes.c | 10 --
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ad06d42..95909f2 100644
--- a/include
ode.
RFC series can be found at:
https://lkml.org/lkml/2018/2/28/76
Ravi Bangoria (8):
Uprobe: Export vaddr <-> offset conversion functions
mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()
Uprobe: Rename map_info to uprobe_map_info
Uprobe: Export uprobe_map_info along with
These exported data structure and functions will be used by other
files in later patches.
No functionality changes.
Signed-off-by: Ravi Bangoria
---
include/linux/uprobes.h | 9 +
kernel/events/uprobes.c | 14 +++---
2 files changed, 12 insertions(+), 11 deletions(-)
diff
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().
No functionality changes.
Signed-off-by: Ravi Bangoria
sed for any synchronization. So we are referring it as 'reference
counter' in kernel / perf code.
Signed-off-by: Ravi Bangoria
Signed-off-by: Fengguang Wu
[Fengguang reported/fixed build failure in RFC patch]
---
include/linux/uprobes.h | 2 +
kernel/events/uprobes.c | 6 ++
kernel/tr
/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
rf
# dd if=/proc/`pgrep tick`/mem bs=1 count=1 skip=$(( 0x10020036 ))
2>/dev/null | xxd
000: 00 .
Signed-off-by: Ravi Bangoria
---
kernel/trace/trace_uprobe.c | 105 +++-
1 file changed, 103 insertions(+)
No functionality changes.
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
401 - 500 of 1366 matches
Mail list logo