如何运行独立的Eclipse MAT? [英] How do I run stand-alone Eclipse MAT?
问题描述
我使用jmap生成了hprof.
I generated hprof using jmap.
sudo ~/jdk/bin/jmap -F -dump:file=app.hprof 5003
现在,我在Eclipse中解析* .hprof时遇到OOM/'Java Heap Space'错误.我想我需要独立运行它.
Now, I am getting OOM / 'Java Heap Space' error while parsing *.hprof in eclipse. I think I need to run it as stand-alone.
我如何运行它?有参考吗?
How do I run it? any references?
推荐答案
我假设您已经下载了采用独立Eclipse RCP应用程序形式的Eclipse MAT .如果不是,请立即执行操作,然后将存档解压缩到适合您的文件夹中.
I assume, you've downloaded Eclipse MAT in the form of Standalone Eclipse RCP Application. If not - do so now, and extract the archive to a folder that suits you.
您将获得OOME,因为MAT的可用内存太少(您正在解析的堆转储太大).
You're getting the OOME, because MAT has too few memory available (the heap-dump you're parsing is too big).
要使堆变大,请编辑您的MemoryAnalyzer.ini
文件(该文件应位于MAT目录中),然后向其中添加以下行:
To make the heap bigger, edit your MemoryAnalyzer.ini
file (it should be in your MAT directory), and add the following lines to it:
-vmargs
-Xmx2048M
2048M
表示JVM将有2 GB的堆空间可用.也许1 GB就足够了.
The 2048M
means 2 gigabytes of heap space will be available to the JVM. Perhaps 1 gigabyte will be enough for you.
注意!
如果您将MAT用作Eclipse插件,则可以通过在Eclipse目录中编辑eclipse.ini
来完成相同的操作.
Note!
If you are using MAT as an Eclipse plugin, you can probably do the same trick by editing eclipse.ini
in your Eclipse directory.
这篇关于如何运行独立的Eclipse MAT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!