Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-goption.
| #!/bin/bash | |
| USAGE="${0##*/} <origin> <dest> <size> <num-colors> [<filter-color> <filter-amount>]" | |
| if [[ $1 == --help ]]; then | |
| echo $USAGE | |
| elif [[ -n $5 ]]; then | |
| magick $1 -dither Floyd-Steinberg -resize $3 -colors $4 \ | |
| \( +clone -fill $5 -colorize $6 \) -compose dissolve \ | |
| -define compose:args=25 -colors $4 -composite \ | |
| $2 && open -a Preview $2 | |
| else |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-goption.