diff options
Diffstat (limited to 'tools/perf/util/evlist.c')
| -rw-r--r-- | tools/perf/util/evlist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 159263d17c2d..1986d8051bd1 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
| @@ -51,13 +51,15 @@ struct perf_evlist *perf_evlist__new(struct cpu_map *cpus, | |||
| 51 | void perf_evlist__config_attrs(struct perf_evlist *evlist, | 51 | void perf_evlist__config_attrs(struct perf_evlist *evlist, |
| 52 | struct perf_record_opts *opts) | 52 | struct perf_record_opts *opts) |
| 53 | { | 53 | { |
| 54 | struct perf_evsel *evsel; | 54 | struct perf_evsel *evsel, *first; |
| 55 | 55 | ||
| 56 | if (evlist->cpus->map[0] < 0) | 56 | if (evlist->cpus->map[0] < 0) |
| 57 | opts->no_inherit = true; | 57 | opts->no_inherit = true; |
| 58 | 58 | ||
| 59 | first = list_entry(evlist->entries.next, struct perf_evsel, node); | ||
| 60 | |||
| 59 | list_for_each_entry(evsel, &evlist->entries, node) { | 61 | list_for_each_entry(evsel, &evlist->entries, node) { |
| 60 | perf_evsel__config(evsel, opts); | 62 | perf_evsel__config(evsel, opts, first); |
| 61 | 63 | ||
| 62 | if (evlist->nr_entries > 1) | 64 | if (evlist->nr_entries > 1) |
| 63 | evsel->attr.sample_type |= PERF_SAMPLE_ID; | 65 | evsel->attr.sample_type |= PERF_SAMPLE_ID; |
