diff options
author | Oleg Nesterov <[email protected]> | 2013-06-20 19:38:06 +0200 |
---|---|---|
committer | Steven Rostedt <[email protected]> | 2013-07-01 20:34:23 -0400 |
commit | 288e984e622336bab8bc3dfdf2f190816362d9a1 (patch) | |
tree | f760ff7bfe1278767f1dd2e2a95d91768ab5ecee /tools/perf/scripts/python/syscall-counts.py | |
parent | 6e94a780374ed31b280f939d4757e8d7858dff16 (diff) |
tracing/kprobes: Avoid perf_trace_buf_*() if ->perf_events is empty
perf_trace_buf_prepare() + perf_trace_buf_submit() make no sense
if this task/CPU has no active counters. Change kprobe_perf_func()
and kretprobe_perf_func() to check call->perf_events beforehand
and return if this list is empty.
For example, "perf record -e some_probe -p1". Only /sbin/init will
report, all other threads which hit the same probe will do
perf_trace_buf_prepare/perf_trace_buf_submit just to realize that
nobody wants perf_swevent_event().
Link: http://lkml.kernel.org/r/[email protected]
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions