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