android_kernel_oneplus_msm8998/tools/perf
Changbin Du b17b42fbad perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()
[ Upstream commit d982b33133284fa7efa0e52ae06b88f9be3ea764 ]

  =================================================================
  ==20875==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 1160 byte(s) in 1 object(s) allocated from:
      #0 0x7f1b6fc84138 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xee138)
      #1 0x55bd50005599 in zalloc util/util.h:23
      #2 0x55bd500068f5 in perf_evsel__newtp_idx util/evsel.c:327
      #3 0x55bd4ff810fc in perf_evsel__newtp /home/work/linux/tools/perf/util/evsel.h:216
      #4 0x55bd4ff81608 in test__perf_evsel__tp_sched_test tests/evsel-tp-sched.c:69
      #5 0x55bd4ff528e6 in run_test tests/builtin-test.c:358
      #6 0x55bd4ff52baf in test_and_print tests/builtin-test.c:388
      #7 0x55bd4ff543fe in __cmd_test tests/builtin-test.c:583
      #8 0x55bd4ff5572f in cmd_test tests/builtin-test.c:722
      #9 0x55bd4ffc4087 in run_builtin /home/changbin/work/linux/tools/perf/perf.c:302
      #10 0x55bd4ffc45c6 in handle_internal_command /home/changbin/work/linux/tools/perf/perf.c:354
      #11 0x55bd4ffc49ca in run_argv /home/changbin/work/linux/tools/perf/perf.c:398
      #12 0x55bd4ffc5138 in main /home/changbin/work/linux/tools/perf/perf.c:520
      #13 0x7f1b6e34809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)

  Indirect leak of 19 byte(s) in 1 object(s) allocated from:
      #0 0x7f1b6fc83f30 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xedf30)
      #1 0x7f1b6e3ac30f in vasprintf (/lib/x86_64-linux-gnu/libc.so.6+0x8830f)

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Fixes: 6a6cd11d4e ("perf test: Add test for the sched tracepoint format fields")
Link: http://lkml.kernel.org/r/20190316080556.3075-17-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-27 09:33:57 +02:00
..
arch perf tools: Add Hygon Dhyana support 2019-02-20 10:13:06 +01:00
bench perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
config perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ 2018-07-19 15:35:57 +02:00
Documentation perf stat: Document --detailed option 2016-05-04 14:48:53 -07:00
python
scripts perf script python: Fix export-to-postgresql.py occasional failure 2018-10-20 09:52:34 +02:00
tests perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test() 2019-04-27 09:33:57 +02:00
trace/strace/groups
ui perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target 2017-07-27 15:06:09 -07:00
util perf evsel: Free evsel->counts in perf_evsel__exit() 2019-04-27 09:33:57 +02:00
.gitignore
Build
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Fix return value of perf buildid-list -k 2015-12-07 12:02:10 -03:00
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-help.c
builtin-inject.c perf inject: Also re-pipe lost_samples event 2015-11-13 12:23:12 -03:00
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c perf probe: Return errno when not hitting any event 2018-03-22 09:23:20 +01:00
builtin-record.c
builtin-report.c perf symbols: Allow forcing reading of non-root owned files by root 2015-11-12 18:58:18 -03:00
builtin-sched.c perf sched latency: Fix thread pid reuse issue 2015-11-05 12:51:00 -03:00
builtin-script.c perf script: Use readdir() instead of deprecated readdir_r() 2017-07-15 11:57:48 +02:00
builtin-stat.c perf stat: Make stat options global 2015-11-05 17:54:34 -03:00
builtin-timechart.c
builtin-top.c perf top: Fix error handling in cmd_top() 2019-04-27 09:33:57 +02:00
builtin-trace.c perf trace: Add mmap alias for s390 2018-04-13 19:50:16 +02:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile perf tools: Disable parallelism for 'make clean' 2018-11-10 07:41:41 -08:00
Makefile.perf perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
MANIFEST perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2019-03-23 08:44:37 +01:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ 2018-07-19 15:35:57 +02:00
perf-with-kcore.sh
perf.c
perf.h perf tools: Allow overriding MAX_NR_CPUS at compile time 2018-09-19 22:48:57 +02:00