Open hargoniX opened 8 months ago
FWIW you can perf record
then load the resulting perf.data
into Firefox Profiler UI with samply load perf.data
. This should give you a decent workaround in the meantime.
samply does support kernel-provided stacks but it's not exposed right now. Ideally we should make more of perf_event_attr
we pass to the kernel configurable.
In programs with very deep recursion
samply
begins producing flamegraphs that are "chopped apart" like in the below picture:(Link to profile: https://share.firefox.dev/49aeiVw) The majority of these calls are in fact not happening at the same stack depth but are instead part of a very deep recursion in the profiled program. Even setting
kernel.perf_event_max_stack
to a high value does not help in this situation.perf
together with aperf.data
visualizer likeflamegraph.pl
on the other hand, can make use of the framepointer that is included in this build of the binary to produce a more accurate flamegraph:And then futher up:
It would be very nice if
samply
provided an option to track deep recursion. Presumably using framepointers as the current approach appears to be unable of doing this?