linux/tools/perf
Nelson Elhage 301b195db1 perf evlist: Fix errno value reporting on failed mmap
On failure, perf_evlist__mmap_per_{cpu,thread} will try to munmap()
every map that doesn't have a NULL base. This will fail with EINVAL if
one of them has base == MAP_FAILED, clobbering errno, so that
perf_evlist__map will return EINVAL on any failure regardless of the
root cause.

Fix this by resetting failed maps to a NULL base.

Acked-by: Namhyung Kim <namhyung@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1324301972-22740-2-git-send-email-nelhage@nelhage.com
Signed-off-by: Nelson Elhage <nelhage@nelhage.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-12-20 13:31:15 -02:00
..
arch perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
bench perf tool: Fix gcc 4.6.0 issues 2011-02-07 12:41:41 -02:00
config perf tools: git mv tools/perf/{features-tests.mak,config/} 2011-04-19 08:18:36 -03:00
Documentation perf report: Document '--call-graph' for optional print_limit argument 2011-12-20 13:28:13 -02:00
python perf evlist: Store pointer to the cpu and thread maps 2011-01-31 12:40:52 -02:00
scripts perf script: Add drop monitor script 2011-09-29 16:41:37 -03:00
util perf evlist: Fix errno value reporting on failed mmap 2011-12-20 13:31:15 -02:00
.gitignore perf tools: Makefile: Remove various and sundry cruft 2011-02-18 07:43:06 -02:00
builtin-annotate.c perf tools: make -C consistent across commands (for cpu list arg) 2011-11-28 11:45:53 -02:00
builtin-bench.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-buildid-cache.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
builtin-buildid-list.c perf buildid-list: Support showing the build id in an ELF file 2011-09-29 16:41:37 -03:00
builtin-diff.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-evlist.c perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
builtin-help.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-inject.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-kmem.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-kvm.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-list.c perf list: Allow filtering list of events 2011-02-17 15:38:58 -02:00
builtin-lock.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-probe.c perf tools: Eliminate duplicate code and use PATH_MAX consistently 2011-11-28 10:11:04 -02:00
builtin-record.c perf record: Add ability to record event period 2011-12-20 12:50:09 -02:00
builtin-report.c perf report: Document '--call-graph' for optional print_limit argument 2011-12-20 13:28:13 -02:00
builtin-sched.c perf tools: Save some loops using perf_evlist__id2evsel 2011-11-28 17:57:40 -02:00
builtin-script.c perf script: Implement option for system-wide profiling 2011-12-12 08:44:00 -02:00
builtin-stat.c perf evlist: Always do automatic allocation of pollfd and mmap structures 2011-11-29 08:05:52 -02:00
builtin-test.c perf test: Soft errors shouldn't stop the "Validate PERF_RECORD_" test 2011-12-02 14:00:04 -02:00
builtin-timechart.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-top.c perf evlist: Always do automatic allocation of pollfd and mmap structures 2011-11-29 08:05:52 -02:00
builtin.h perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
command-list.txt perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00
Makefile perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
MANIFEST perf packaging: add memcpy to perf MANIFEST 2010-11-30 23:00:10 -02:00
perf-archive.sh perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.c perf tools: Simplify debugfs mountpoint handling code 2011-11-28 10:11:28 -02:00
perf.h perf record: Add ability to record event period 2011-12-20 12:50:09 -02:00