summaryrefslogtreecommitdiff
path: root/tools/lib/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-13 13:02:20 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-10-13 13:02:20 -0300
commitdbaa1b3d9afba3c050d365245a36616ae3f425a7 (patch)
tree5fc6bea725975062bfa6e818205685ecf85cfb78 /tools/lib/perf
parenta41c32105cc12a7d2ae11a591929a6add98987cd (diff)
parentbef69bd7cfc363ab94b84ea29102f3e913ed3c6c (diff)
Merge branch 'perf/urgent' into perf/core
To pick fixes that missed v5.9. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/perf')
-rw-r--r--tools/lib/perf/evlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index 2208444ecb44..cfcdbd7be066 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -45,6 +45,9 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
if (!evsel->own_cpus || evlist->has_user_cpus) {
perf_cpu_map__put(evsel->cpus);
evsel->cpus = perf_cpu_map__get(evlist->cpus);
+ } else if (!evsel->system_wide && perf_cpu_map__empty(evlist->cpus)) {
+ perf_cpu_map__put(evsel->cpus);
+ evsel->cpus = perf_cpu_map__get(evlist->cpus);
} else if (evsel->cpus != evsel->own_cpus) {
perf_cpu_map__put(evsel->cpus);
evsel->cpus = perf_cpu_map__get(evsel->own_cpus);