uprobes/perf: Avoid perf_trace_buf_prepare/submit if ->perf_events is empty
authorOleg Nesterov <oleg@redhat.com>
Sat, 13 Apr 2013 13:36:49 +0000 (15:36 +0200)
committerOleg Nesterov <oleg@redhat.com>
Mon, 15 Apr 2013 15:39:52 +0000 (17:39 +0200)
commit515619f209114697fabd21eed1623bfa69746815
tree84655a5404fb290f8492f3f953f9e61007f7c3e2
parent32520b2c695b23221751eb09360a6a3dd3105b52
uprobes/perf: Avoid perf_trace_buf_prepare/submit 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 uprobe_perf_print()
to return if hlist_empty(call->perf_events).

Note: this is not uprobe-specific, we can change other users too.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
kernel/trace/trace_uprobe.c