diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-11 19:45:41 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 07:37:43 -0500 |
commit | 10d0f086df77f3ff259b46cb501362dbaf2c7989 (patch) | |
tree | 69c8d8ccca5545c524abe0ac52a149e78fbc279f /tools/perf/builtin-inject.c | |
parent | 81e36bffad95e015af9741b5b1ee16afe08aab05 (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.c | 8 |
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, | |||
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | static int perf_event__repipe_attr(union perf_event *event, | ||
40 | struct perf_evlist **pevlist __used) | ||
41 | { | ||
42 | return perf_event__repipe_synth(event, NULL); | ||
43 | } | ||
44 | |||
39 | static int perf_event__repipe(union perf_event *event, | 45 | static int perf_event__repipe(union perf_event *event, |
40 | struct perf_sample *sample __used, | 46 | struct perf_sample *sample __used, |
41 | struct perf_session *session) | 47 | struct perf_session *session) |
@@ -182,7 +188,7 @@ struct perf_event_ops inject_ops = { | |||
182 | .read = perf_event__repipe, | 188 | .read = perf_event__repipe, |
183 | .throttle = perf_event__repipe, | 189 | .throttle = perf_event__repipe, |
184 | .unthrottle = perf_event__repipe, | 190 | .unthrottle = perf_event__repipe, |
185 | .attr = perf_event__repipe_synth, | 191 | .attr = perf_event__repipe_attr, |
186 | .event_type = perf_event__repipe_synth, | 192 | .event_type = perf_event__repipe_synth, |
187 | .tracing_data = perf_event__repipe_synth, | 193 | .tracing_data = perf_event__repipe_synth, |
188 | .build_id = perf_event__repipe_synth, | 194 | .build_id = perf_event__repipe_synth, |