jmap / jhat -baseline problem

hi,

i'm trying to use jmap to generate two heap dumps and then use jhat with option -baseline to compare them to see what objects were added (ie. track a memory leak). however, the instance/object ids seem to change from dump to dump. i tried logging the creation/finalization of some objects, and while i can see that they are certainly created only once and never finalized, their ids are different on different dumps. i also tried to use jconsole and the heap dump mx bean operation, and got the same results. i'm using jdk 1.6.0b105 64bit . can you please point me to some docs or suggest what am i doing wrong, please?

thanks & regards

peter

[678 byte] By [pmscreena] at [2007-11-26 20:12:18]
# 1
The -baseline can only be used to compare heap dumps generated by the HPROF agent, and only then then both dumps are generated from the same VM. I don't know if this is documented anywhere but it should be.
alan.batemana at 2007-7-9 23:17:51 > top of Java-index,Core,Monitoring & Management...
# 2

thanks. that's the info i needed. we're having problems with using hprof in 1.6.0 b105 (win64) - dumping heap crashes on the second dump (randomly, during instance or class size check). our test takes considerable amount of time, so i needed this confirmation that it's the right way to go.

by the way - is there any "unofficial" workaround for bug 6379450 ?

pmscreena at 2007-7-9 23:17:52 > top of Java-index,Core,Monitoring & Management...
# 3

Although you can't compare dumps obtained via jmap -dump you should be able to compare the object histograms generated by jmap -histo. If you sort the output by class name then you should get an idea what has changed.

6379450 is a bug in the HPROF agent that hasn't been tracked down. The source code is in the demo directory if you want to investigate it.

alan.batemana at 2007-7-9 23:17:52 > top of Java-index,Core,Monitoring & Management...