Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
This requires you have flamegraph available in your path. The rust-unmangle script is optional but nice.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" type="text/css" | |
| href="https://cdn.jsdelivr.net/gh/spiermar/[email protected]/dist/d3.flameGraph.min.css" | |
| integrity="sha256-w762vSe6WGrkVZ7gEOpnn2Y+FSmAGlX77jYj7nhuCyY=" | |
| crossorigin="anonymous" | |
| /> | |
| </head> |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
This requires you have flamegraph available in your path. The rust-unmangle script is optional but nice.