1 Star 0 Fork 2

sunlock0653/shell_opt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
flame_create.sh 691 Bytes
一键复制 编辑 原始数据 按行查看 历史
sunlock0653 提交于 2023-08-11 19:52 . 上交所完成
# install
git clone https://github.com/brendangregg/FlameGraph.git
ln -s /usr/local/src/FlameGraph/flamegraph.pl /usr/local/bin/flamegraph.pl
ln -s /usr/local/src/FlameGraph/stackcollapse-perf.pl /usr/local/bin/stackcollapse-perf.p
pid=$2;
if [ "$1" == "oncpu" ];then
perf script -i perf_with_stack.data | stackcollapse-perf.pl | flamegraph.pl > perf.svg
fi
if [ "$1" == "offcpu" ];then
perf script -i perf.data | stackcollapse-perf.pl | \
flamegraph.pl --countname=ms --colors=io \
--title="off-cpu Time Flame Graph" > perf.svg
fi
if [ "$1" == "java" ];then
jstack -l $pid > tmp.txt;
#之后将tmp.txt文件上传至 https://www.fastthread.io/,即可获得完整火焰图
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/sunlock0653/shell_opts.git
[email protected]:sunlock0653/shell_opts.git
sunlock0653
shell_opts
shell_opt
master

搜索帮助