diff options
author | Chang Hyun Park <heartinpiece@gmail.com> | 2014-09-26 21:54:01 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-09-29 15:25:36 -0300 |
commit | 2c82c3ad56921c47f28af9eb8ed96b6d99b47623 (patch) | |
tree | 3e99e9e83e01476bb2c7caa4a50222999a99e2fc /tools/perf/bench/mem-memcpy-x86-64-asm-def.h | |
parent | 46441bdc76fee08e297ebcf17e4ca91013b1ee9e (diff) | |
download | blackbird-obmc-linux-2c82c3ad56921c47f28af9eb8ed96b6d99b47623.tar.gz blackbird-obmc-linux-2c82c3ad56921c47f28af9eb8ed96b6d99b47623.zip |
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>
Diffstat (limited to 'tools/perf/bench/mem-memcpy-x86-64-asm-def.h')
0 files changed, 0 insertions, 0 deletions