inferno 0.3.0

Rust port of the FlameGraph performance profiling tool suite
Documentation

Crates.io Documentation Build Status Codecov Dependency status

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 the flamegraph plotting tool. So far, the focus has been on parsing profiling results from perf, and inferno-collapse-perf is ~10x faster than stackcollapse-perf.

It is developed in part through live coding sessions, which you can find on YouTube.

Dependency

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

Build Inferno

$ 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:

colorized flamegraph output

Comparison to the Perl implementation

To compare performance, run ./compare.sh. It requires hyperfine.

License

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!