kernel_optimize_test/tools/perf/lib
Andi Kleen 2ccfb8bc21 perf evsel: Avoid close(-1)
In some weak fallback cases close can be called a lot with -1. Check for
this case and avoid calling close then.

This is mainly to shut up valgrind which complains about this case.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20191020175202.32456-3-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-06 15:43:05 -03:00
..
Documentation libperf: Initial documentation 2019-07-29 18:34:47 -03:00
include libperf: Add pr_err() macro 2019-10-19 15:35:01 -03:00
tests libperf: Keep count of failed tests 2019-10-19 15:35:01 -03:00
Build libperf: Add perf_mmap__init() function 2019-10-10 09:37:25 -03:00
core.c perf tools: Propagate CFLAGS to libperf 2019-10-11 10:55:22 -03:00
cpumap.c libperf: Adopt perf_cpu_map__max() function 2019-09-10 14:33:32 +01:00
evlist.c libperf: Move mask setup to perf_evlist__mmap_ops() 2019-10-19 15:35:01 -03:00
evsel.c perf evsel: Avoid close(-1) 2019-11-06 15:43:05 -03:00
internal.h libperf: Add pr_err() macro 2019-10-19 15:35:01 -03:00
lib.c libperf: Move 'page_size' global variable to libperf 2019-09-25 09:51:48 -03:00
libperf.map libperf: Do not export perf_evsel__init()/perf_evlist__init() 2019-10-19 15:35:01 -03:00
libperf.pc.template libperf: Add install targets 2019-07-29 18:34:46 -03:00
Makefile libperf: Link static tests with libapi.a 2019-10-19 15:35:01 -03:00
mmap.c libperf: Introduce perf_evlist__for_each_mmap() 2019-10-19 15:35:01 -03:00
threadmap.c libperf: Add perf_thread_map__nr/perf_thread_map__pid functions 2019-08-22 17:16:57 -03:00
xyarray.c