diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-10 23:41:31 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-12 00:19:01 +0400 |
commit | f77a951826b44b763e4d9fbd2479b6132d2bd7fc (patch) | |
tree | 13d02b7130d1d6ce0fe7ef787c1ed56258f4868c /tools/perf/util/evlist.c | |
parent | 62b807f64948f55776b1cc57298966d915b1a402 (diff) | |
download | linux-f77a951826b44b763e4d9fbd2479b6132d2bd7fc.tar.xz |
perf evlist: Set the leader in the perf_evlist__config method
Since we need to ensure the leader is set before configuring the
evsel perf_event_attrs.
Reducing the boilerplate needed by tools, helping, for instance,
'perf trace', that wasn't setting the leader.
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-22shm0ptkch2kgl7rtqlligx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 5a0878d3a038..dc8aee97a488 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -49,10 +49,16 @@ struct perf_evlist *perf_evlist__new(struct cpu_map *cpus, return evlist; } -void perf_evlist__config_attrs(struct perf_evlist *evlist, - struct perf_record_opts *opts) +void perf_evlist__config(struct perf_evlist *evlist, + struct perf_record_opts *opts) { struct perf_evsel *evsel; + /* + * Set the evsel leader links before we configure attributes, + * since some might depend on this info. + */ + if (opts->group) + perf_evlist__set_leader(evlist); if (evlist->cpus->map[0] < 0) opts->no_inherit = true; |