diff options
-rw-r--r-- | tools/perf/util/evlist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 40bd2c04df8a..59ef2802fcf6 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -1003,9 +1003,12 @@ void perf_evlist__close(struct perf_evlist *evlist) | |||
1003 | struct perf_evsel *evsel; | 1003 | struct perf_evsel *evsel; |
1004 | int ncpus = cpu_map__nr(evlist->cpus); | 1004 | int ncpus = cpu_map__nr(evlist->cpus); |
1005 | int nthreads = thread_map__nr(evlist->threads); | 1005 | int nthreads = thread_map__nr(evlist->threads); |
1006 | int n; | ||
1006 | 1007 | ||
1007 | evlist__for_each_reverse(evlist, evsel) | 1008 | evlist__for_each_reverse(evlist, evsel) { |
1008 | perf_evsel__close(evsel, ncpus, nthreads); | 1009 | n = evsel->cpus ? evsel->cpus->nr : ncpus; |
1010 | perf_evsel__close(evsel, n, nthreads); | ||
1011 | } | ||
1009 | } | 1012 | } |
1010 | 1013 | ||
1011 | int perf_evlist__open(struct perf_evlist *evlist) | 1014 | int perf_evlist__open(struct perf_evlist *evlist) |