summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-11-11 22:45:41 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 10:37:43 -0200
commit10d0f086df77f3ff259b46cb501362dbaf2c7989 (patch)
tree69c8d8ccca5545c524abe0ac52a149e78fbc279f /tools/perf/builtin-inject.c
parent81e36bffad95e015af9741b5b1ee16afe08aab05 (diff)
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 <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ug1wtjbnva4bxwknflkkrlrh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c8
1 files changed, 7 insertions, 1 deletions
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,