diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-02-04 17:48:34 +0100 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-02-08 18:28:07 +0100 |
commit | f42d24a1d20d2e72d1e5d48930f18b138dfad117 (patch) | |
tree | 10696fc2f0a21d60a7fb1581efecd172435f0408 /kernel/mutex-debug.h | |
parent | 31ba334836c0ac0039084859f14a5b96858493dc (diff) |
uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE
Change uprobe_trace_func() and uprobe_perf_func() to return "int". Change
uprobe_dispatcher() to return "trace_ret | perf_ret" although this is not
needed, currently TP_FLAG_TRACE/TP_FLAG_PROFILE are mutually exclusive.
The only functional change is that uprobe_perf_func() checks the filtering
too and returns UPROBE_HANDLER_REMOVE if nobody wants to trace current.
Testing:
# perf probe -x /lib/libc.so.6 syscall
# perf record -e probe_libc:syscall -i perl -e 'fork; syscall -1 for 1..10; wait'
# perf report --show-total-period
100.00% 10 perl libc-2.8.so [.] syscall
Before this patch:
# cat /sys/kernel/debug/tracing/uprobe_profile
/lib/libc.so.6 syscall 20
A child process doesn't have a counter, but still it hits this breakoint
"copied" by dup_mmap().
After the patch:
# cat /sys/kernel/debug/tracing/uprobe_profile
/lib/libc.so.6 syscall 11
The child process hits this int3 only once and does unapply_uprobe().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/mutex-debug.h')
0 files changed, 0 insertions, 0 deletions