https://github.com/brendangregg/FlameGraph

Graph variants

  • --reverse stack-reversed flame graph
  • --inverted icicle graph (top to bottom, like icicles)

On RHEL 10

You may install js-ds-flame-graph and use

perf script flamegraph -a -F 49 sleep 30
# or
pref record -F 49 -a -g -- sleep 30
perf script report flamegraph

This is available since perf from Linux 5.8.