google / orbit

C/C++ Performance Profiler
https://orbitprofiler.com/
BSD 2-Clause "Simplified" License
4.19k stars 346 forks source link

Callstacks on Uprobes #58

Open florian-kuebler opened 4 years ago

florian-kuebler commented 4 years ago

On Windows you can right-click on a probe of a dynamically instrumented function and get the callstack of that call. This should be also possible in the Linux and remote version.

florian-kuebler commented 4 years ago

This is somewhat working with bpftrace, however the callstacks from bpftrace rely on framepointers and are not that reliable, so this is turned off for the moment. However, it would be nice, to have a UI switch to turn it on again.

In the long term, we should switch from bpftrace to perf_event_open syscall and use libunwindstack (Android) or libunwind to for stack unwinding.

dimitry- commented 4 years ago

I believe this is done.

florian-kuebler commented 4 years ago

Actually this is not done in the current version (there might be some option), but in general we are to slow to process callstacks for many uprobes, which is why we don't have them at the moment. However, it is desirable (e.g. by a custom trampoline) to have them.

dimitry- commented 4 years ago

Trackin internally: http://b/159107241