Alexey Budankov
10ccbc1cc0
perf report: Prefer DWARF callstacks to LBR ones when captured both
...
Display DWARF based callchains when the perf.data file contains raw thread
stack data as LBR callstack data.
Commiter testing:
This changes the output from the branch stack based one, i.e. without
this patch, for the same file as in the previous csets:
# perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
#
# Total Lost Samples: 0
#
# Samples: 13 of event 'cycles'
# Event count (approx.): 13
#
# Overhead Command Source Shared Object Source Symbol Target Symbol Basic Block Cycles
# ........ ....... .................... ........................... ......................................... ..................
#
7.69% ls libpthread-2.29.so [.] _init [.] __pthread_initialize_minimal_internal 6827
7.69% ls ld-2.29.so [k] _start [k] _dl_start -
7.69% ls ld-2.29.so [.] _dl_start_user [.] _dl_init -24790
7.69% ls ld-2.29.so [k] _dl_start [k] _dl_sysdep_start 278
7.69% ls ld-2.29.so [k] dl_main [k] _dl_map_object_deps 15581
7.69% ls ld-2.29.so [k] open_verify.constprop.0 [k] lseek64 4228
7.69% ls ld-2.29.so [k] _dl_map_object [k] open_verify.constprop.0 55
7.69% ls ld-2.29.so [k] openaux [k] _dl_map_object 67
7.69% ls ld-2.29.so [k] _dl_map_object_deps [k] 0x00007f441b57c090 112
7.69% ls ld-2.29.so [.] call_init.part.0 [.] _init 334
7.69% ls ld-2.29.so [.] _dl_init [.] call_init.part.0 383
7.69% ls ld-2.29.so [k] _dl_sysdep_start [k] dl_main 45
7.69% ls ld-2.29.so [k] _dl_catch_exception [k] openaux 116
#
# (Tip: For memory address profiling, try: perf mem record / perf mem report)
#
To the one that shows call chains:
# perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 10 of event 'cycles'
# Event count (approx.): 3204047
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... .................. .........................................
#
55.01% 0.00% ls [kernel.vmlinux] [k] entry_SYSCALL_64_after_hwframe
|
---entry_SYSCALL_64_after_hwframe
do_syscall_64
|
--16.01%--__x64_sys_execve
__do_execve_file.isra.0
search_binary_handler
load_elf_binary
elf_map
vm_mmap_pgoff
do_mmap
mmap_region
perf_event_mmap
perf_iterate_sb
perf_iterate_ctx
perf_event_mmap_output
perf_output_copy
memcpy_erms
55.01% 39.00% ls [kernel.vmlinux] [k] do_syscall_64
|
|--39.00%--0xffffffffffffffff
| _dl_map_object
| open_verify.constprop.0
| __lseek64 (inlined)
| entry_SYSCALL_64_after_hwframe
| do_syscall_64
|
--16.01%--do_syscall_64
__x64_sys_execve
__do_execve_file.isra.0
search_binary_handler
load_elf_binary
elf_map
vm_mmap_pgoff
do_mmap
mmap_region
perf_event_mmap
perf_iterate_sb
perf_iterate_ctx
perf_event_mmap_output
perf_output_copy
memcpy_erms
42.95% 42.95% ls libpthread-2.29.so [.] __pthread_initialize_minimal_internal
|
---_init
__pthread_initialize_minimal_internal
42.95% 0.00% ls libpthread-2.29.so [.] _init
|
---_init
__pthread_initialize_minimal_internal
<SNIP>
#
# (Tip: Profiling branch (mis)predictions with: perf record -b / perf report)
#
#
The branch stack view be explicitely selected using:
# perf report -h branch-stack
Usage: perf report [<options>]
-b, --branch-stack use branch records for per branch histogram filling
#
I.e. after this patch:
# perf report -b --stdio
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 13 of event 'cycles'
# Event count (approx.): 13
#
# Overhead Command Source Shared Object Source Symbol Target Symbol Basic Block Cycles
# ........ ....... .................... ........................... ......................................... ..................
#
7.69% ls libpthread-2.29.so [.] _init [.] __pthread_initialize_minimal_internal 6827
7.69% ls ld-2.29.so [k] _start [k] _dl_start -
7.69% ls ld-2.29.so [.] _dl_start_user [.] _dl_init -24790
7.69% ls ld-2.29.so [k] _dl_start [k] _dl_sysdep_start 278
7.69% ls ld-2.29.so [k] dl_main [k] _dl_map_object_deps 15581
7.69% ls ld-2.29.so [k] open_verify.constprop.0 [k] lseek64 4228
7.69% ls ld-2.29.so [k] _dl_map_object [k] open_verify.constprop.0 55
7.69% ls ld-2.29.so [k] openaux [k] _dl_map_object 67
7.69% ls ld-2.29.so [k] _dl_map_object_deps [k] 0x00007f441b57c090 112
7.69% ls ld-2.29.so [.] call_init.part.0 [.] _init 334
7.69% ls ld-2.29.so [.] _dl_init [.] call_init.part.0 383
7.69% ls ld-2.29.so [k] _dl_sysdep_start [k] dl_main 45
7.69% ls ld-2.29.so [k] _dl_catch_exception [k] openaux 116
#
# (Tip: Show current config key-value pairs: perf config --list)
#
#
Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/ccbd9583-82f4-dec5-7e84-64bf56e351fb@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-08-20 12:20:16 -03:00
..
2019-08-14 10:59:59 -03:00
2019-08-12 16:25:00 -03:00
2019-08-16 12:14:33 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:40 -03:00
2019-07-07 17:53:09 -03:00
2019-07-29 18:34:47 -03:00
2019-08-15 12:04:04 -03:00
2019-06-05 17:37:14 +02:00
2019-07-10 13:05:12 -03:00
2019-08-14 10:59:59 -03:00
2019-07-29 09:03:42 -03:00
2019-08-14 11:00:00 -03:00
2019-08-20 12:19:44 -03:00
2018-02-05 13:58:02 -03:00
2019-02-14 15:18:08 -03:00
2019-07-29 18:34:42 -03:00
2019-07-09 10:13:26 -03:00
2019-02-22 16:52:07 -03:00
2019-02-22 16:52:07 -03:00
2019-07-29 18:34:42 -03:00
2019-07-09 10:13:22 -03:00
2017-11-02 11:10:55 +01:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:45 -03:00
2019-08-14 10:59:59 -03:00
2019-07-09 10:13:26 -03:00
2019-07-29 18:34:45 -03:00
2019-06-05 17:30:26 +02:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:45 -03:00
2019-04-01 14:49:25 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:42 -03:00
2019-07-23 09:04:41 -03:00
2019-08-14 10:59:59 -03:00
2019-08-20 12:20:16 -03:00
2019-07-29 18:34:45 -03:00
2019-08-15 12:25:55 -03:00
2019-07-29 18:34:46 -03:00
2019-07-29 18:34:45 -03:00
2019-08-15 16:03:26 -03:00
2019-08-15 12:26:21 -03:00
2019-07-15 07:59:05 -03:00
2019-03-11 16:33:19 -03:00
2019-08-20 12:08:23 -03:00
2018-09-19 14:53:36 -03:00
2019-01-21 11:01:18 +01:00
2018-08-20 08:54:58 -03:00
2019-08-20 12:07:22 -03:00
2019-08-12 17:14:14 -03:00
2019-07-09 10:13:26 -03:00
2017-11-02 11:10:55 +01:00
2017-12-27 12:16:00 -03:00
2019-01-08 13:28:13 -03:00
2018-02-23 14:29:59 +00:00
2019-06-17 12:29:16 +02:00
2019-08-12 16:26:02 -03:00
2019-08-14 10:59:59 -03:00