diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 11eb95b2106b..6e88d404b5b3 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1290,7 +1290,7 @@ void evlist__close(struct evlist *evlist) * With perf record core.cpus is usually NULL. * Use the old method to handle this for now. */ - if (!evlist->core.cpus) { + if (!evlist->core.cpus || cpu_map__is_dummy(evlist->core.cpus)) { evlist__for_each_entry_reverse(evlist, evsel) evsel__close(evsel); return;