Skip to content

Commit 4717291

Browse files
captain5050acmel
authored andcommitted
perf evlist: Missing TPEBS close in evlist__close()
The libperf evsel close won't close TPEBS events properly. Add a test to do this. The libperf close routine is used in evlist__close() for affinity reasons. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andres Freund <andres@anarazel.de> Cc: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Dr. David Alan Gilbert <linux@treblig.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent ff85481 commit 4717291

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/perf/util/evlist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,8 @@ void evlist__close(struct evlist *evlist)
13561356
return;
13571357

13581358
evlist__for_each_cpu(evlist_cpu_itr, evlist, &affinity) {
1359+
if (evlist_cpu_itr.cpu_map_idx == 0 && evsel__is_retire_lat(evlist_cpu_itr.evsel))
1360+
evsel__tpebs_close(evlist_cpu_itr.evsel);
13591361
perf_evsel__close_cpu(&evlist_cpu_itr.evsel->core,
13601362
evlist_cpu_itr.cpu_map_idx);
13611363
}

0 commit comments

Comments
 (0)