perf session: Pass evsel in event_ops->sample()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Mar 2011 18:44:01 +0000 (15:44 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 23 Mar 2011 22:28:58 +0000 (19:28 -0300)
commit9e69c210822c4035708a6111567c96364ca244d5
tree3bae4b7f4309ec18bf4628b81cf85bb1570f6a31
parent880f57318450dbead6a03f9e31a1468924d6dd88
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>
17 files changed:
tools/perf/builtin-annotate.c
tools/perf/builtin-diff.c
tools/perf/builtin-inject.c
tools/perf/builtin-kmem.c
tools/perf/builtin-lock.c
tools/perf/builtin-report.c
tools/perf/builtin-sched.c
tools/perf/builtin-script.c
tools/perf/builtin-timechart.c
tools/perf/util/build-id.c
tools/perf/util/hist.h
tools/perf/util/scripting-engines/trace-event-perl.c
tools/perf/util/scripting-engines/trace-event-python.c
tools/perf/util/session.c
tools/perf/util/session.h
tools/perf/util/trace-event-scripting.c
tools/perf/util/trace-event.h