简体   繁体   中英

Eclipse can't parse heap dump

When I try to open my .hprof file(800 MB), i get:

An internal error occurred during: "Parsing heap dump from 'D:\\Workspace\\Java\\MemoryLeaks\\java_pid9004.hprof'".

I tried to increase heap size up to -Xmx2048m, but this doesn't help.

Eclipse MAT – Increasing Heap size

If you are analyzing a heap dump of size, say 800 mb, allocate at least additional 800mb space for Eclipse MAT. If you can allocate more heap space, then it's more the merrier. You can allocate additional heap space for Eclipse MAT tool, by editing MemoryAnalyzer.ini file. This file is located in the same folder where MemoryAnalyzer.exe is present. To the MemoryAnalyzer.ini you will add -Xmx1600m at the bottom.

Below is a sample MemoryAnalyzer.ini file with added -Xmx value:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library 
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-vmargs
-Xmx1600m

On the other hand, you may consider using other memory analysis tools such as: HeapHero.io and JHat . However please be advised that JHat doesn't work well with large size heap dumps and takes long time to load.

800MB exactly? Are you sure there isn't more to the heapdump and you aren't just using a chunk of it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM