perf evlist: Fix parsing with no sample_id_all bit set
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 4 Sep 2013 20:18:17 +0000 (23:18 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 Sep 2013 19:18:08 +0000 (16:18 -0300)
commit98be6966ed7ed977881305aff5a1bfb305090f43
treedefc5bbc7232ec4d88df9422f3faa25791241d6a
parent53a277e5c9b55ed3e91345fb98e5f57d6d70efd6
perf evlist: Fix parsing with no sample_id_all bit set

The perf_evlist__event2evsel() is changed to handle non-sample events
(such as mmap events) that have no id sample appended i.e. when
sample_id_all is not set.

Note that such events have a fixed format, so that the selected event
(evsel) they are associated with is immaterial.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: David Ahern <dsahern@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1378325897-3840-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c