alistair23-linux/tools/perf
Chang Hyun Park 2c82c3ad56 perf trace: Fix mmap return address truncation to 32-bit
Using 'perf trace' for mmap is truncating return values by stripping the
top 32 bits, actually printing only the lower 32 bits.

This was because the ret value was of an 'int' type and not a 'long'
type.

  The Problem:

  991258501.244 ( 0.004 ms): mmap(len: 40001536, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS, fd: -1) = 0x56691000
  991258501.257 ( 0.000 ms): minfault [_int_malloc+0x1038] => //anon@0x7fa056691008 //(d.)

The first line shows an mmap, which succeeds and returns 0x56691000.

However the next line shows a memory access to that virtual memory area,
specifically to 0x7fa056691008. The upper 32 bit is lost due to the
problem mentioned above, and thus mmap's return value didn't have the
upper 0x7fa0.

Tested on 3.17-rc5 from the linus's tree, and the HEAD of tip/master

Signed-off-by: Chang Hyun Park <heartinpiece@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1411736041-8017-1-git-send-email-heartinpiece@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-09-29 15:25:36 -03:00
..
arch perf tool: fix compilation for ARM 2014-09-17 17:08:09 -03:00
bench perf tools: Don't include sys/poll.h directly 2014-09-17 17:08:09 -03:00
config perf tools: Fix GNU-only grep usage in Makefile 2014-09-17 17:08:09 -03:00
Documentation perf tools: Disable kernel symbol demangling by default 2014-09-17 17:08:09 -03:00
python
scripts perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
tests tools lib fd array: Allow associating an integer cookie with each entry 2014-09-25 16:46:55 -03:00
ui perf hists browser: Fix callchain print bug on TUI 2014-09-26 12:38:02 -03:00
util perf tools: Refactor unit and scale function parameters 2014-09-29 15:03:57 -03:00
.gitignore perf tools: Add perf-with-kcore script 2014-09-17 17:08:08 -03:00
builtin-annotate.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-bench.c perf bench: Add --repeat option 2014-06-19 16:13:15 -03:00
builtin-buildid-cache.c perf buildid-cache: Use strerror_r instead of strerror 2014-08-15 13:07:59 -03:00
builtin-buildid-list.c
builtin-diff.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-evlist.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-help.c perf help: Use strerror_r instead of strerror 2014-08-15 13:08:26 -03:00
builtin-inject.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-kmem.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-kvm.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-list.c perf list: Add usage 2013-11-05 14:26:41 -03:00
builtin-lock.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-mem.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-probe.c perf probe: Do not access kallsyms when analyzing user binaries 2014-09-17 18:01:14 -03:00
builtin-record.c perf tools: Convert {record,top}.call-graph option to call-graph.record-mode 2014-09-26 12:43:53 -03:00
builtin-report.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-sched.c perf sched: Use strerror_r instead of strerror 2014-08-15 13:07:47 -03:00
builtin-script.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-stat.c perf stat: Fix --per-core on multi socket systems 2014-09-26 10:17:13 -03:00
builtin-timechart.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-top.c perf tools: Convert {record,top}.call-graph option to call-graph.record-mode 2014-09-26 12:43:53 -03:00
builtin-trace.c perf trace: Fix mmap return address truncation to 32-bit 2014-09-29 15:25:36 -03:00
builtin.h
command-list.txt
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf tools: Add 'build-test' make target 2014-01-16 16:26:26 -03:00
Makefile.perf tools lib api: Adopt fdarray class from perf's evlist 2014-09-25 16:46:55 -03:00
MANIFEST perf kvm: Add stat support on s390 2014-07-16 17:57:33 -03:00
perf-archive.sh
perf-completion.sh perf sched: Introduce --list-cmds for use by scripts 2014-04-16 17:16:05 +02:00
perf-sys.h perf tools: Allow to use cpuinfo on s390 2014-07-07 16:55:24 -03:00
perf-with-kcore.sh perf tools: Add perf-with-kcore script 2014-09-17 17:08:08 -03:00
perf.c perf: Use strerror_r instead of strerror 2014-08-15 10:54:29 -03:00
perf.h perf tools: Move callchain config from record_opts to callchain_param 2014-09-26 12:40:33 -03:00