On 6/18/22 13:22, Frank Ch. Eigler wrote:
demiobenour wrote:
>> (Note FWIW that systemtap's kernel runtime does DWARF-based unwinding
>> for the kernel and user-designated userspace executables and
>> shared-libraries on demand, and it's not particularly slow at it.)
>
> How does it do that? Does it have a kernel-mode DWARF unwinder?
Yes.
# stap -e 'probe timer.profile { if(user_mode()) {
print_ubacktrace() println()
} }' \
-d /lib64/libc.so.6 -d /path/to/other/library --ldd
see also, e.g.:
https://sourceware.org/systemtap/man/stap.1.html
https://sourceware.org/systemtap/tapsets/API-print-backtrace-fileline.html
https://sourceware.org/systemtap/tapsets/API-print-ubacktrace-brief.html
> Is this trick something that perf could use as well?
Yes, but this approach is unlikely to be adopted there.
Why is this?
--
Sincerely,
Demi Marie Obenour (she/her/hers)