内容简介:下载地址:依据不同的操作系统下载响应版本。
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${heap.dump.path}
下载并调整MAT(Eclipse Memory Analyze Tool)
下载地址: https://www.eclipse.org/mat/downloads.php
依据不同的操作系统下载响应版本。
解析dump出的文件
通常情况下,dump出的文件是很大的。需要修改一下MemoryAnalyzer.ini,调大 -Xmx 参数,至少要比要分析的文件相等。
-startup ../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar --launcher.library ../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.700.v20180518-1200 -vmargs -Xmx10G -Dorg.eclipse.swt.internal.carbon.smallFonts -XstartOnFirstThread
无界面执行(LINUX)
./ParseHeapDump.sh ${dump.prof} org.eclipse.mat.api:suspects
还支持另外两个:
org.eclipse.mat.api:overview
org.eclipse.mat.api:top_components
执行之后,产生多个zip版html。不过这个版本,没有直接分析出来的好用,有些功能有缺失。
以上所述就是小编给大家介绍的《利用MAT来分析JAVA内存泄露》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Python for Data Analysis
Wes McKinney / O'Reilly Media / 2012-11-1 / USD 39.99
Finding great data analysts is difficult. Despite the explosive growth of data in industries ranging from manufacturing and retail to high technology, finance, and healthcare, learning and accessing d......一起来看看 《Python for Data Analysis》 这本书的介绍吧!