perf script: Don't assume evsel position of tracking events
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 21 Jul 2015 09:44:05 +0000 (12:44 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 24 Jul 2015 01:51:14 +0000 (22:51 -0300)
commit06b234ec26fde8d0fce54030fe0858e218636410
treef67c8fc915bd7ee20140db6a0dc3988518d3a76a
parentb757bb09134f479a087ece08d2cd2a6ba31c9210
perf script: Don't assume evsel position of tracking events

The tracking event does not have to be the first event so replace
perf_evlist__first() with perf_evlist__id2evsel() which uses the event
ID to find the correct evsel.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1437471846-26995-5-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c