-
install
perf
$ sudo apt-get install -y linux-tools-common linux-tools-generic
-
rebuild the project with debug info
- For Rust, add
debug = true
in the[profile.release]
section. - For C++, add
-g
for release build.
- For Rust, add
-
profile with
flamegraph
$ sudo /path/to/flamegraph -- ${EXECUTABLE_AND_ARGS}