libperf: Add own_cpus to struct perf_evsel
Move own_cpus from tools/perf's evsel to libbpf's perf_evsel. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-52-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
d400bd3abf
commit
fe1f61b37f
@@ -159,12 +159,12 @@ static void __perf_evlist__propagate_maps(struct evlist *evlist,
|
||||
* We already have cpus for evsel (via PMU sysfs) so
|
||||
* keep it, if there's no target cpu list defined.
|
||||
*/
|
||||
if (!evsel->own_cpus || evlist->has_user_cpus) {
|
||||
if (!evsel->core.own_cpus || evlist->has_user_cpus) {
|
||||
perf_cpu_map__put(evsel->core.cpus);
|
||||
evsel->core.cpus = perf_cpu_map__get(evlist->cpus);
|
||||
} else if (evsel->core.cpus != evsel->own_cpus) {
|
||||
} else if (evsel->core.cpus != evsel->core.own_cpus) {
|
||||
perf_cpu_map__put(evsel->core.cpus);
|
||||
evsel->core.cpus = perf_cpu_map__get(evsel->own_cpus);
|
||||
evsel->core.cpus = perf_cpu_map__get(evsel->core.own_cpus);
|
||||
}
|
||||
|
||||
perf_thread_map__put(evsel->threads);
|
||||
|
||||
Reference in New Issue
Block a user