perf evlist: Fix event ID retrieval for group format read case
authorJiri Olsa <jolsa@redhat.com>
Fri, 12 Oct 2012 11:02:21 +0000 (13:02 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Aug 2013 20:35:21 +0000 (17:35 -0300)
commitc4861afe30aa3b00c95f9389f24cf6ede88416e4
tree03533a832810cece7d2eac4d076ad32fd5e4e716
parent9ede473cc9f655f8a10cfc8ebbf04c48d84db7ee
perf evlist: Fix event ID retrieval for group format read case

We need to fail the event ID retrieval in case both following conditions
are true:

  - we are on kernel with no PERF_EVENT_IOC_ID support
  - PERF_FORMAT_GROUP read format is set

The PERF_FORMAT_GROUP read format bit is the killer for retrieving event
ID out of the read syscall, because we have no guarantee of the event
placement within leader kernel sibling list.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-e93pgyj20rqx48qzw10vj4r4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c