perf evsel: No need to always ask for PERF_FORMAT_ID in read_format
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Dec 2012 18:29:12 +0000 (15:29 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Dec 2012 20:12:58 +0000 (17:12 -0300)
commit3a5afaec593954a399967155db47f72cb8828a6a
treeba35db914dcfb07555da7217125db11d2cc9676a
parent7a5a5ca5fe3df8636c96b49591c23baf7c415dd4
perf evsel: No need to always ask for PERF_FORMAT_ID in read_format

Instead make perf_evlist__confir_attrs use perf_evsel__set_sample_id()
when having more than one event, that way only if we have multiple
events we'll ask to have the event ids returned when we read its file
descriptors.

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 <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-xuho5hrrxy2ky0cjpr80hyfp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/attr/base-record
tools/perf/tests/attr/test-record-group
tools/perf/tests/attr/test-record-group1
tools/perf/util/evlist.c
tools/perf/util/evsel.c