利用MAT来分析JAVA内存泄露

栏目: Java · 发布时间: 7年前

内容简介:下载地址:依据不同的操作系统下载响应版本。
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${heap.dump.path}

下载并调整MAT(Eclipse Memory Analyze Tool)

下载地址: https://www.eclipse.org/mat/downloads.php

利用MAT来分析 <a href='https://www.codercto.com/topics/22013.html'>JAVA</a> 内存泄露

依据不同的操作系统下载响应版本。

解析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内存泄露》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Building Web Reputation Systems

Building Web Reputation Systems

Randy Farmer、Bryce Glass / Yahoo Press / 2010 / GBP 31.99

What do Amazon's product reviews, eBay's feedback score system, Slashdot's Karma System, and Xbox Live's Achievements have in common? They're all examples of successful reputation systems that enable ......一起来看看 《Building Web Reputation Systems》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具