Adrian Hunter | faf9670 | 2013-08-27 11:23:08 +0300 | [diff] [blame^] | 1 | #include "evlist.h" |
| 2 | #include "evsel.h" |
| 3 | #include "cpumap.h" |
| 4 | |
| 5 | void perf_evlist__config(struct perf_evlist *evlist, |
| 6 | struct perf_record_opts *opts) |
| 7 | { |
| 8 | struct perf_evsel *evsel; |
| 9 | /* |
| 10 | * Set the evsel leader links before we configure attributes, |
| 11 | * since some might depend on this info. |
| 12 | */ |
| 13 | if (opts->group) |
| 14 | perf_evlist__set_leader(evlist); |
| 15 | |
| 16 | if (evlist->cpus->map[0] < 0) |
| 17 | opts->no_inherit = true; |
| 18 | |
| 19 | list_for_each_entry(evsel, &evlist->entries, node) { |
| 20 | perf_evsel__config(evsel, opts); |
| 21 | |
| 22 | if (evlist->nr_entries > 1) |
| 23 | perf_evsel__set_sample_id(evsel); |
| 24 | } |
| 25 | } |