Skip to content

perf test: Fix cpu/thread map leaks

Namhyung Kim lkml 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11perf test: Fix cpu and thread map leaks in basic mmap testtools/perf/tests/mmap-basic.c+0 -20 replies
2/11perf test: Fix a memory leak in attr testtools/perf/tests/attr.c+7 -10 replies
3/11perf test: Fix cpu and thread map leaks in task_exit testtools/perf/tests/task-exit.c+3 -70 replies
4/11perf test: Fix cpu and thread map leaks in sw_clock_freq testtools/perf/tests/sw-clock.c+4 -84 replies
5/11perf test: Fix cpu and thread map leaks in code_reading testtools/perf/tests/code-reading.c+3 -70 replies
6/11perf test: Fix cpu and thread map leaks in keep_tracking testtools/perf/tests/keep-tracking.c+2 -30 replies
7/11perf test: Fix cpu and thread map leaks in switch_tracking testtools/perf/tests/switch-tracking.c+2 -30 replies
8/11perf test: Fix a thread map leak in thread_map_synthesize testtools/perf/tests/thread-map.c+1 -00 replies
9/11perf test: Fix a memory leak in thread_map_remove testtools/perf/tests/thread-map.c+2 -50 replies
10/11perf test: Fix cpu map leaks in cpu_map_print testtools/perf/tests/cpumap.c+2 -00 replies
11/11perf test: Fix cpu and thread map leaks in perf_time_to_tsc testtools/perf/tests/perf-time-to-tsc.c+2 -00 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by.

PatchJiri Olsa
1/11
2/11
3/11
4/11A-b
5/11
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 00/11] perf test: Fix cpu/thread map leaks

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(-)
Signature · 1 line
2.30.1.766.gb4fecdf3b7-goog