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>
Showing
- tools/perf/builtin-annotate.c 4 additions, 14 deletionstools/perf/builtin-annotate.c
- tools/perf/builtin-diff.c 1 addition, 0 deletionstools/perf/builtin-diff.c
- tools/perf/builtin-inject.c 10 additions, 1 deletiontools/perf/builtin-inject.c
- tools/perf/builtin-kmem.c 1 addition, 0 deletionstools/perf/builtin-kmem.c
- tools/perf/builtin-lock.c 3 additions, 1 deletiontools/perf/builtin-lock.c
- tools/perf/builtin-report.c 4 additions, 15 deletionstools/perf/builtin-report.c
- tools/perf/builtin-sched.c 1 addition, 0 deletionstools/perf/builtin-sched.c
- tools/perf/builtin-script.c 4 additions, 11 deletionstools/perf/builtin-script.c
- tools/perf/builtin-timechart.c 11 additions, 0 deletionstools/perf/builtin-timechart.c
- tools/perf/util/build-id.c 1 addition, 0 deletionstools/perf/util/build-id.c
- tools/perf/util/hist.h 1 addition, 0 deletionstools/perf/util/hist.h
- tools/perf/util/scripting-engines/trace-event-perl.c 1 addition, 0 deletionstools/perf/util/scripting-engines/trace-event-perl.c
- tools/perf/util/scripting-engines/trace-event-python.c 1 addition, 0 deletionstools/perf/util/scripting-engines/trace-event-python.c
- tools/perf/util/session.c 23 additions, 2 deletionstools/perf/util/session.c
- tools/perf/util/session.h 5 additions, 2 deletionstools/perf/util/session.h
- tools/perf/util/trace-event-scripting.c 1 addition, 0 deletionstools/perf/util/trace-event-scripting.c
- tools/perf/util/trace-event.h 1 addition, 0 deletionstools/perf/util/trace-event.h
Loading
Please register or sign in to comment