[9] RFR (S): 8059340: ConstantPool::_resolved_references is missing in heap dump

Staffan Larsen staffan.larsen at oracle.com
Mon Oct 6 07:35:37 UTC 2014


This looks like a good approach. However, there are a couple of more places that need to be updated.

The hprof binary format is described in jdk/src/jdk.hprof.agent/share/native/libhprof/manual.html and needs to be updated. It’s also more formally specified in hprof_b_spec.h in the same directory.

The hprof JVMTI agent in jdk/src/jdk.hprof.agent code would also need to be updated to show this field. Since this is a JVMTI agent it needs to be possible to find the resolved_refrences array via the JVMTI heap walking API. Perhaps that already works? - I haven’t looked.

Finally, the Serviceability Agent implements yet another hprof binary dumper in hotspot/agent//src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java which also needs to write this reference.

Thanks,
/Staffan

On 29 sep 2014, at 16:51, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:

> http://cr.openjdk.java.net/~vlivanov/8059340/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8059340
> 
> VM heap dump doesn't contain ConstantPool::_resolved_references for classes which have resolved references.
> 
> ConstantPool::_resolved_references points to an Object[] holding resolved constant pool entries (patches for VM anonymous classes, linked CallSite & MethodType for invokedynamic instructions).
> 
> I've decided to use reserved slot in HPROF class header format.
> It requires an update in jhat to correctly display new info.
> 
> The other approach I tried was to dump the reference as a fake static field [1], but storing VM internal ConstantPool::_resolved_references among user defined fields looks confusing.
> 
> Testing: manual (verified that corresponding arrays are properly linked in Nashorn heap dump).
> 
> Thanks!
> 
> Best regards,
> Vladimir Ivanov
> 
> [1] http://cr.openjdk.java.net/~vlivanov/8059340/static



More information about the hotspot-dev mailing list