Documentation

Commentary

View profiling data as a flame graph.  Data can come from Emacs's native
profiler (see `profiler.el') or from a folded stacks file (the common
flame-graph interchange format).

Start the profiler with `profiler-start', run the code you want to
measure, then `M-x flamegraph-profiler-report' to view the result.
`M-x flamegraph-find-profile' opens a profile previously saved with
`profiler-report-write-profile', or a folded-stacks file.

The graph is drawn top-down ("icicle" orientation): the outermost frame
(bottom of the call stack) is the top row, and the stack grows downward.
Each box's width is proportional to the number of samples (or bytes, for
memory profiles) collected while that frame was on the stack.

In the *Flamegraph* buffer:
  RET / mouse-1   zoom into the frame at point (make it the new root)
  u               zoom back out to the parent frame
  t               reset the zoom to the whole graph
  l / r           go back / forward through the zoom history
  n / TAB         move to the next frame
  p / S-TAB       move to the previous frame
  d               describe the frame at point
  mouse-2         describe the clicked frame
  f               visit the frame's source (definition or file:line)
  g               redraw (e.g. after resizing the window)
  q               quit

The pipeline has three stages:
  1. A data source produces a `profiler-calltree': the profiler via
     `profiler-calltree-build', a folded-stacks file by direct parsing.
  2. `flamegraph--frames' lays that tree out into a flat list of
     `flamegraph-frame' records, each carrying a fractional
     START and WIDTH in [0,1] plus a DEPTH.
  3. The frames are rendered into the buffer, which you can then navigate
     and zoom.

Consumers

Reverse Dependencies

No reverse dependencies recorded.