Re: [RFCv2 1/4] perf stat: balance opening and reading events

2016-07-18 Thread Jiri Olsa
On Fri, Jul 15, 2016 at 11:08:10AM +0100, Mark Rutland wrote: > In create_perf_stat_counter, when a target CPU has not been provided, we > call __perf_evsel__open with empty_cpu_map, and open a single FD per > thread. However, in read_counter we assume that we opened events for > the product of thr

[RFCv2 1/4] perf stat: balance opening and reading events

2016-07-15 Thread Mark Rutland
In create_perf_stat_counter, when a target CPU has not been provided, we call __perf_evsel__open with empty_cpu_map, and open a single FD per thread. However, in read_counter we assume that we opened events for the product of threads and CPUs described in the evsel's cpu_map. Thus, if an evsel has