On Tue, 03 Nov 2020 23:17:09 +0100, Jiri Olsa wrote: > When you compiled perf with libunwind, you get: > > $ make VF=1 > $ perf report -i perf.data --stdio > > # Children Self Trace output > # ........ ........ .............. > # > 100.00% 100.00% (5640789cdf50) > | > |--98.85%--0x7fc8eca0f554 > | main > | main_loop_wait > | qemu_poll_ns > | > --1.15%--0x7fc8ecdc2ea4 > iothread_run > aio_poll > qemu_poll_ns > > > When you compile perf with libdw, you get: > > $ make VF=1 NO_LIBUNWIND=1 > $ perf report -i perf.data --stdio > > # Children Self Trace output > # ........ ........ .............. > # > 100.00% 100.00% (5640789cdf50) > | > |--98.85%--0x45260879 > | qemu_poll_ns > | > --1.15%--qemu_poll_ns I get after the attached fix: # Children Self Trace output # ........ ........ .............. # 100.00% 100.00% (5640789cdf50) | |--98.85%--main | main_loop_wait | qemu_poll_ns | --1.15%--iothread_run aio_poll qemu_poll_ns > any idea why libdw is doing that? ;-) Because libdw was reporting separate debuginfo file as the main file: (lldb) p thread->process->dwfl->modulelist->main.name (char *) $1 = 0x0000000000b52490 "/home/jkratoch/.debug/.build-id/fc/d0111443729957fa8ef9511ff5dc3e9a5ccf9d/debug" (lldb) p thread->process->dwfl->modulelist->debug.name (char *) $2 = 0x0000000000000000 The correct way is to report the main ELF file as the main file: (lldb) p thread->process->dwfl->modulelist->main.name (char *) $1 = 0x0000000000b52490 "/home/jkratoch/.debug/.build-id/fc/d0111443729957fa8ef9511ff5dc3e9a5ccf9d/elf" (lldb) p thread->process->dwfl->modulelist->debug.name (char *) $2 = 0x0000000000000000 In some cases it may later fill-in even the ->debug.name with "/debug" filename. Jan Kratochvil