How do I run stand-alone Eclipse MAT?

余生长醉 提交于 2019-12-07 15:50:39

问题


I generated hprof using jmap.

sudo ~/jdk/bin/jmap -F -dump:file=app.hprof 5003  

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?


回答1:


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.

You're getting the OOME, because MAT has too few memory available (the heap-dump you're parsing is too big).

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

The 2048M means 2 gigabytes of heap space will be available to the JVM. Perhaps 1 gigabyte will be enough for you.

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.



来源:https://stackoverflow.com/questions/12050846/how-do-i-run-stand-alone-eclipse-mat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!