From 10d0f086df77f3ff259b46cb501362dbaf2c7989 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 11 Nov 2011 22:45:41 -0200 Subject: perf event: perf_event_ops->attr() manipulates only an evlist Removing another case where a perf_session is required when processing events. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-ug1wtjbnva4bxwknflkkrlrh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-inject.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/perf/builtin-inject.c') diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 8dfc12bb119b..978751ec64ce 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -36,6 +36,12 @@ static int perf_event__repipe_synth(union perf_event *event, return 0; } +static int perf_event__repipe_attr(union perf_event *event, + struct perf_evlist **pevlist __used) +{ + return perf_event__repipe_synth(event, NULL); +} + static int perf_event__repipe(union perf_event *event, struct perf_sample *sample __used, struct perf_session *session) @@ -182,7 +188,7 @@ struct perf_event_ops inject_ops = { .read = perf_event__repipe, .throttle = perf_event__repipe, .unthrottle = perf_event__repipe, - .attr = perf_event__repipe_synth, + .attr = perf_event__repipe_attr, .event_type = perf_event__repipe_synth, .tracing_data = perf_event__repipe_synth, .build_id = perf_event__repipe_synth, -- cgit v1.2.3