Inferno is a port of parts of the flamegraph
toolkit to Rust, with the
aim of improving the performance of the original flamegraph tools. The
primary focus is on speeding up the
stackcollapse-* tools that process
output from various profiling tools into the "folded" format expected by
flamegraph plotting tool. So far, the focus has been on parsing
profiling results from
inferno-collapse-perf is ~10x faster than
It is developed in part through live coding sessions, which you can find on YouTube.
You need to have the
perf tool installed on your Linux systems.
This can involve installing package like
linux-tools-generic for Ubuntu or
linux-tools for Debian.
You may need to tweak a kernel config such as
$ echo 0 | sudo tee /proc/sys/kernel/perf_event_paranoid
See this stackoverflow answer for details.
How to Use
$ cargo build --release
Run a program using profiling with perf
$ perf record -g [your program]
Transform perf output to svg
$ perf script | ./target/release/inferno-collapse-perf | ./target/release/inferno-flamegraph > out.svg
You'll end up with an image like this:
Comparison to the Perl implementation
To compare performance, run
./compare.sh. It requires hyperfine.
Inferno is a port of @brendangregg's awesome original FlameGraph project, written in Perl, and owes its existence and pretty much of all of its functionality entirely to that project. Like FlameGraph, Inferno is licensed under the CDDL 1.0 to avoid any licensing issues. Specifically, the CDDL 1.0 grants
a world-wide, royalty-free, non-exclusive license under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
as long as the source is made available along with the license (3.1), both of which are true since you're reading this file!