diff options
author | Lexi Shao <[email protected]> | 2021-10-19 15:24:17 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-10-27 20:56:36 -0300 |
commit | 57d7ecfd1133e303fcab67521fea3398df8c5b62 (patch) | |
tree | a065fceb9bee79abe9927e32e4228149ba155900 /include/linux/psci.h | |
parent | c1ff12dac4657e0134c972978479b97f652711a2 (diff) |
perf script: Show binary offsets for userspace addr
Show binary offsets for userspace addr with map in perf script output
with callchain.
In commit 19610184693c("perf script: Show virtual addresses instead of
offsets"), the addr shown in perf script output with callchain is changed
from binary offsets to virtual address to fix the incorrectness when
displaying symbol offset.
This is inconvenient in scenario that the binary is stripped and
symbol cannot be resolved. If someone wants to further resolve symbols for
specific binaries later, he would need an extra step to translate virtual
address to binary offset with mapping information recorded in perf.data,
which can be difficult for people not familiar with perf.
This patch modifies function sample__fprintf_callchain to print binary
offset for userspace addr with dsos, and virtual address otherwise. It
does not affect symbol offset calculation so symoff remains correct.
Before applying this patch:
test 1512 78.711307: 533129 cycles:
aaaae0da07f4 [unknown] (/tmp/test)
aaaae0da0704 [unknown] (/tmp/test)
ffffbe9f7ef4 __libc_start_main+0xe4 (/lib64/libc-2.31.so)
After this patch:
test 1519 111.330127: 406953 cycles:
7f4 [unknown] (/tmp/test)
704 [unknown] (/tmp/test)
20ef4 __libc_start_main+0xe4 (/lib64/libc-2.31.so)
Fixes: 19610184693c("perf script: Show virtual addresses instead of offsets")
Signed-off-by: Lexi Shao <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Tested-by: Jiri Olsa <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: QiuXi <[email protected]>
Cc: Wangbing <[email protected]>
Cc: Xiaoming Ni <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'include/linux/psci.h')
0 files changed, 0 insertions, 0 deletions