您现在的位置是:首页 > 文章详情

使用火焰图FlameGraph分析JVM应用性能

日期:2019-07-19点击:727

安装及使用

安装前提软件

centos

yum install perf -y yum install gcc -y yum install gcc-c++ yum install cmake -y

ubuntu

apt install linux-tools-generic apt install linux-tools-common

FlameGraph

# 参考 http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#Java export JAVA_HOME=/root/jdk1.8.0_181 export PATH=$JAVA_HOME/bin:$PATH git clone --depth=1 https://github.com/jrudolph/perf-map-agent cd perf-map-agent cmake . make bin/create-links-in /usr/bin git clone https://github.com/brendangregg/FlameGraph.git export FLAMEGRAPH_DIR=/root/git/FlameGraph # jvm启动参数需要增加 -XX:+PreserveFramePointer perf-java-flames 21322

结果展示

svg格式的图片可以下钻,点击查看: [](http://oss.zrbcool.top/picgo/flamegraph-21322.svg)http://oss.zrbcool.top/picgo/flamegraph-21322.svg

容器内如何分析?

请参考笔者的另一篇文章Docker中使用FlameGraph分析JVM应用性能

更多参考

https://www.meiwen.com.cn/subject/xafqkqtx.html https://bugs.openjdk.java.net/browse/JDK-8068945 https://bugs.openjdk.java.net/browse/JDK-6515172 http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2014-December/016477.html https://medium.com/netflix-techblog/java-in-flames-e763b3d32166 https://blog.codecentric.de/en/2017/09/jvm-fire-using-flame-graphs-analyse-performance/ https://github.com/jvm-profiling-tools/honest-profiler/wiki/How-to-Run https://gperftools.github.io/gperftools/pprof-vsnprintf-big.gif https://github.com/jvm-profiling-tools/perf-map-agent http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#Java http://www.brendangregg.com/blog/2014-06-12/java-flame-graphs.html https://github.com/brendangregg/FlameGraph
原文链接:https://yq.aliyun.com/articles/710055
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章