Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » can not get heap dump on win32 ?
can not get heap dump on win32 ? [message #9588] Wed, 25 March 2009 00:33 Go to next message
nanao is currently offline nanaoFriend
Messages: 3
Registered: July 2009
Junior Member
hello, is there any way to get heap dump on win32?
java -XX:+HeapDumpOnOutOfMemoryError doesn't work.
thx
Re: can not get heap dump on win32 ? [message #9612 is a reply to message #9588] Wed, 25 March 2009 07:59 Go to previous messageGo to next message
Erwin Margewitsch is currently offline Erwin MargewitschFriend
Messages: 17
Registered: July 2009
Junior Member
Hi,

It depends on the version of the VM you are using...

Under http://wiki.eclipse.org/MemoryAnalyzer#Getting_a_Heap_Dump
you can see which option to trigger a heap dump is available for different
VMs...

Hope that helps,
Erwin
Re: can not get heap dump on win32 ? [message #9701 is a reply to message #9612] Wed, 25 March 2009 16:11 Go to previous messageGo to next message
nanao is currently offline nanaoFriend
Messages: 3
Registered: July 2009
Junior Member
I'm using J2SDK1.4.2 (this is our main focus), so Jmap and Jconsole is not
possible.

On JDK1.5.0_12, jps doesn't give any PID looks like I can not get heap
dump with jmap. Also on JDK1.5.0_12, jconsole doesn't show any PID for the
java process that is running my osgi framework.jar.

Can someone point me to wiki or where/how to get heap dump with agent
method?
thx
Re: can not get heap dump on win32 ? [message #9742 is a reply to message #9701] Wed, 25 March 2009 18:13 Go to previous messageGo to next message
Taras Tielkes is currently offline Taras TielkesFriend
Messages: 38
Registered: July 2009
Member
-XX:+HeapDumpOnOutOfMemoryError was backported to 1.4.2_12, although
some specific bugs may require you to use 1.4.2_15 or later.

Support for "jmap" on Win32 only starts from Java 1.6.

You could also try to use YourKit to obtain a (YK-specific) memory
snapshot on Win32/Java 1.4. However, this is out of scope for discussion
in this newsgroup I think :)
Re: can not get heap dump on win32 ? [message #9760 is a reply to message #9742] Wed, 25 March 2009 23:08 Go to previous messageGo to next message
nanao is currently offline nanaoFriend
Messages: 3
Registered: July 2009
Junior Member
ok, so I'm trying with j2sdk1.4.2_16, I just want to get a heap dump,
currently the program doesn't show OutOfMemoryError, but I want to force a
heap dump when java.exe process is larger than 64MB, how can I do this? thx

currently I'm trying this but it's not giving a dump:
c:\j2sdk1.4.2_16\bin\java -XX:+HeapDumpOnOutOfMemoryError -Xmx64m -jar
framework.jar
Re: can not get heap dump on win32 ? [message #9782 is a reply to message #9760] Thu, 26 March 2009 21:17 Go to previous message
Taras Tielkes is currently offline Taras TielkesFriend
Messages: 38
Registered: July 2009
Member
I'm not sure.

You could try to allocate an outrageous amount of memory in some
controlled way (through an JMX-exposed method?) to force an OOM.

-tt
Previous Topic:Save value to file: support specific encoding
Next Topic:How to get all objects which class implements specific interface?
Goto Forum:
  


Current Time: Sat Dec 20 03:13:19 GMT 2014

Powered by FUDForum. Page generated in 0.02816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software