https://github.com/cambrian/accumulator/blob/master/flamegraph.sh中有利用火焰图进行性能分析。
dtrace
在linux 4.15系统版本上编译安装存在Redefinition of `struct in6_addr’ 问题。
Mina Kimchi SNARK库 也使用了flamegraph进行性能优化。
详细的Cargo flamegraph可参见:
- https://github.com/flamegraph-rs/flamegraph
$ sudo CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --bin flamegraph --notes "proof creation" -- prove --root
Finished release [optimized + debuginfo] target(s) in 0.23s
dtrace: system integrity protection is on, some features will not be available
dtrace: description 'profile-997 ' matched 1 probe
dtrace: error on enabled probe ID 1 (ID 199: profile:::profile-997): invalid address (0x9a15b87e72e8cd4b) in action #2
dtrace: error on enabled probe ID 1 (ID 199: profile:::profile-997): invalid address (0xffffefff) in action #2
dtrace: error on enabled probe ID 1 (ID 199: profile:::profile-997): invalid address (0x5a430fbd) in action #2
dtrace: error on enabled probe ID 1 (ID 199: profile:::profile-997): invalid address (0x4000) in action #2
dtrace: error on enabled probe ID 1 (ID 199: profile:::profile-997): invalid address (0x5a430fbd) in action #2
^C
writing flamegraph to "flamegraph.svg"
参考资料: [1] https://github.com/brendangregg/FlameGraph [2] http://www.brendangregg.com/flamegraphs.html [3] https://www.usenix.org/conference/atc17/program/presentation/gregg-flame [4] https://github.com/cambrian/accumulator/blob/master/flamegraph.sh [5] https://github.com/dtrace4linux/linux/