linux-stable/tools/perf/bench
Sohaib Mohamed 99643bdc6f perf bench futex: Fix memory leak of perf_cpu_map__new()
[ Upstream commit 88e48238d5 ]

ASan reports memory leaks while running:

  $ sudo ./perf bench futex all

The leaks are caused by perf_cpu_map__new not being freed.
This patch adds the missing perf_cpu_map__put since it calls
cpu_map_delete implicitly.

Fixes: 9c3516d1b8 ("libperf: Add perf_cpu_map__new()/perf_cpu_map__read() functions")
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: André Almeida <andrealmeid@collabora.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20211112201134.77892-1-sohaib.amhmd@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-25 09:48:33 +01:00
..
bench.h perf bench: Add benchmark for evlist open/close operations 2021-08-10 11:32:37 -03:00
Build perf bench: Add benchmark for evlist open/close operations 2021-08-10 11:32:37 -03:00
epoll-ctl.c perf env: Remove unneeded internal/cpumap inclusions 2021-02-12 17:35:48 -03:00
epoll-wait.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
evlist-open-close.c perf bench evlist-open-close: Use PRIu64 with u64 to fix build on 32-bit architectures 2021-08-30 18:22:02 -03:00
find-bit-bench.c tools: rename bitmap_alloc() to bitmap_zalloc() 2021-09-08 11:50:27 -07:00
futex-hash.c perf bench futex: Add --mlockall parameter 2021-08-09 12:00:04 -03:00
futex-lock-pi.c perf bench futex: Fix memory leak of perf_cpu_map__new() 2021-11-25 09:48:33 +01:00
futex-requeue.c perf bench futex: Fix memory leak of perf_cpu_map__new() 2021-11-25 09:48:33 +01:00
futex-wake-parallel.c perf bench futex: Fix memory leak of perf_cpu_map__new() 2021-11-25 09:48:33 +01:00
futex-wake.c perf bench futex: Fix memory leak of perf_cpu_map__new() 2021-11-25 09:48:33 +01:00
futex.h perf bench futex, requeue: Add --pi parameter 2021-08-09 12:00:27 -03:00
inject-buildid.c perf bench inject-buildid: Handle writen() errors 2021-08-30 10:06:37 -03:00
kallsyms-parse.c perf bench: Add kallsyms parsing 2020-05-05 16:35:32 -03:00
mem-functions.c perf bench mem: Always memset source before memcpy 2020-08-13 09:34:26 -03:00
mem-memcpy-arch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem-memcpy-x86-64-asm-def.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem-memcpy-x86-64-asm.S tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2020-11-12 17:55:41 -03:00
mem-memset-arch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem-memset-x86-64-asm-def.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem-memset-x86-64-asm.S tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2020-11-12 17:55:41 -03:00
numa.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
sched-messaging.c perf tools: Cast (struct timeval).tv_sec when printing 2021-03-06 16:54:24 -03:00
sched-pipe.c perf tools: Cast (struct timeval).tv_sec when printing 2021-03-06 16:54:24 -03:00
synthesize.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
syscall.c perf tools: Cast (struct timeval).tv_sec when printing 2021-03-06 16:54:24 -03:00