On Fri, Mar 10, 2017 at 01:24:34PM -0800, Andi Kleen wrote: SNIP
> + > +struct aggr_data { > + u64 ena, run, val; > + int id; > + int nr; > + int cpu; > +}; > + > +static void aggr_cb(struct perf_evsel *counter, void *data, bool first) > +{ > + struct aggr_data *ad = data; > + int cpu, s2; > + > + for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) { > + struct perf_counts_values *counts; > + > + s2 = aggr_get_id(evsel_list->cpus, cpu); why do use evsel_list instead of perf_evsel__cpus(counter), which is in the original/removed code? this patch is about adding collect_data.. if you want to choose this part, please make it clear in separate patch thanks, jirka