Lurker News
Back to discussion

Comment by manwe150

manwe1502 replies#
Flamegraphs sort the samples by location, rather than ordered by time. They also show hierarchy, rather than just leafs. All combinations on those two axis can be useful to present. Strictly speaking a normal profiler is probably one that gives leaf calls only in order, which is probably the least useful quadrant, but the fastest to generate (works better for hand annotated events and to see latency rather than time)
Sesse__1 reply#
> Flamegraphs sort the samples by location, rather than ordered by time.

I'm not sure if I understand. Do you mean ordered by amount of time spent, or by event time in the executable? (Most profilers do the former, and flame graphs are implicitly a variant of that by scaling the blocks visually by execution time.)
> They also show hierarchy, rather than just leafs.
Like any profiler in graph mode? Every profiler I've used over the last 20 years (even gprof!) can show function hierarchy, both top-down and bottom-up.

manwe150#
Event time. It's a common mode for profilers that are looking at latency. And yes, any profiler in call stack mode is the same data, just without the colorful visuals, as he talked about in the intro paragraph: https://www.brendangregg.com/flamegraphs.html
pacoverdi#
With most flamegraph implementations, you can reverse the flame and see often called (hot) methods.

I tried to combine both orientations in a 3d visualization here:
https://github.com/pcdv/mountain-graph