An unofficial, read-only Hacker News reader. Join the beta →

Worshipping at the altar of Brendan Gregg (opens external site)

241 points by kqr 4 days ago | fzakaria.com | 47 comments on HN

View full thread · View on Hacker News

Comment thread (4)

  1. 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)
    Replies (2)
    1. > 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.

      Replies (1)
      1. 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
    2. 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