Reputation: 63
I'm trying to generate a heap dump from my java program, but no matter what I seem to try I can't seem to figure out how to do so.
I downloaded the Eclipse Memory Analyzer (Plugin and then Standalone) which is supposed to be able to aquire heat dumps from active jre processes.. yet it lists none. The documentation lists several otherways of generating them, but I can't seem to make any of them work, or they refer to something that just doesn't seem to exist on my system. Same applies from anything I've managed to find on the web...
The program isn't causing an out of memory exception, its just using far more resources then I'm expecting it too.
I'm just at a complete loss at how exactly its supposed to be done :/
Any help would be appreciated thanks.
Upvotes: 6
Views: 3086
Reputation: 9775
You can do it manually, using Java JDK's jmap.exe
.
PID
of your process.jmap.exe -dump:format=b,file=C:\dump\dump.bin PID
C:\dump\dump.bin
)Then you can use NetBeans IDE to analyze this dump. It has an inbuilt tools, just import the dump.bin
.
Upvotes: 8