Hi, This patchset fixes memory leaks in the perf test code. In my company setup, it runs daily with various sanitizers on, so I want to reduce the failures due to the leaks not the logic.
This time I've focused on the cpu and thread maps as they are obvious and easy to fix. I'll take a look at the rest failures. I didn't add the Fixes: tags since most changes seem to predate the libperf change. I'm not sure if I could just add the original commit hash as this fix is meaningful only if Asan is enabled.. I'm afraid the stable tree maintainers will see patches not applied cleanly. But I can add them if you want, so please let me know. It's also available at perf/asan-fix-v1 branch in git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Thanks, Namhyung Namhyung Kim (11): perf test: Fix cpu and thread map leaks in basic mmap test perf test: Fix a memory leak in attr test perf test: Fix cpu and thread map leaks in task_exit test perf test: Fix cpu and thread map leaks in sw_clock_freq test perf test: Fix cpu and thread map leaks in code_reading test perf test: Fix cpu and thread map leaks in keep_tracking test perf test: Fix cpu and thread map leaks in switch_tracking test perf test: Fix a thread map leak in thread_map_synthesize test perf test: Fix a memory leak in thread_map_remove test perf test: Fix cpu map leaks in cpu_map_print test perf test: Fix cpu and thread map leaks in perf_time_to_tsc test tools/perf/tests/attr.c | 8 +++++++- tools/perf/tests/code-reading.c | 10 +++------- tools/perf/tests/cpumap.c | 2 ++ tools/perf/tests/keep-tracking.c | 5 ++--- tools/perf/tests/mmap-basic.c | 2 -- tools/perf/tests/perf-time-to-tsc.c | 2 ++ tools/perf/tests/sw-clock.c | 12 ++++-------- tools/perf/tests/switch-tracking.c | 5 ++--- tools/perf/tests/task-exit.c | 10 +++------- tools/perf/tests/thread-map.c | 8 +++----- 10 files changed, 28 insertions(+), 36 deletions(-) -- 2.30.1.766.gb4fecdf3b7-goog