diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-15 14:44:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-23 18:28:58 -0400 |
commit | 9e69c210822c4035708a6111567c96364ca244d5 (patch) | |
tree | 3bae4b7f4309ec18bf4628b81cf85bb1570f6a31 /tools/perf/util/scripting-engines | |
parent | 880f57318450dbead6a03f9e31a1468924d6dd88 (diff) |
perf session: Pass evsel in event_ops->sample()
Resolving the sample->id to an evsel since the most advanced tools,
report and annotate, and the others will too when they evolve to
properly support multi-event perf.data files.
Good also because it does an extra validation, checking that the ID is
valid when present. When that is not the case, the overhead is just a
branch + function call (perf_evlist__id2evsel).
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 1 | ||||
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 621427212e86..74350ffb57fe 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
@@ -247,6 +247,7 @@ static inline struct event *find_cache_event(int type) | |||
247 | 247 | ||
248 | static void perl_process_event(union perf_event *pevent __unused, | 248 | static void perl_process_event(union perf_event *pevent __unused, |
249 | struct perf_sample *sample, | 249 | struct perf_sample *sample, |
250 | struct perf_evsel *evsel, | ||
250 | struct perf_session *session __unused, | 251 | struct perf_session *session __unused, |
251 | struct thread *thread) | 252 | struct thread *thread) |
252 | { | 253 | { |
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 1b85d6055159..6ccf70e8d8f2 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
@@ -206,6 +206,7 @@ static inline struct event *find_cache_event(int type) | |||
206 | 206 | ||
207 | static void python_process_event(union perf_event *pevent __unused, | 207 | static void python_process_event(union perf_event *pevent __unused, |
208 | struct perf_sample *sample, | 208 | struct perf_sample *sample, |
209 | struct perf_evsel *evsel __unused, | ||
209 | struct perf_session *session __unused, | 210 | struct perf_session *session __unused, |
210 | struct thread *thread) | 211 | struct thread *thread) |
211 | { | 212 | { |