On mac os, programs may need Instruments to tuning, and when you face too many probe messages, you‘ll need some Flame Graphs.
Here I introduce Brendan Gregg and his blog:
http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html
and he mestioned one guy make a Flame Graphs with Instruments:
https://schani.wordpress.com/2012/11/16/flame-graphs-for-instruments
and then I try to make some flame on osx.
1. open xcode
2. input Command+i to open Instruments
3. choose "Time Profiler"
4. choose one target
5. start recording a call tree
6. export to out.csv Instrument -> Export Track
7. then use Bredan‘s script to run
stackcollapse-instruments.pl out.csv | ./flamegraph.pl >mygraph.svg
done.
时间: 2024-10-06 10:13:09