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]

# 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 ?
# 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.