Hi Claes, Looks good to me. For those who would want to see the patch change done in the serviceability-agent: http://hg.openjdk.java.net/jdk/jdk/rev/91f06b86c0da
Thanks, Jc On Fri, Mar 15, 2019 at 5:10 AM Claes Redestad <claes.redes...@oracle.com> wrote: > Hi, > > to allow for archiving objects in CDS that might not be loaded (e.g., > JDK-8214712), we need to ignore objects at heap dump time that haven't > actually been loaded. This patch fixes the VM heapDumper implementation, > and is a mirror of a fix already done in the serviceability-agent heap > dumper[1]. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8220682 > Patch: > diff -r 082cd1e3c441 src/hotspot/share/services/heapDumper.cpp > --- a/src/hotspot/share/services/heapDumper.cpp Mon Dec 03 16:25:27 2018 > +0100 > +++ b/src/hotspot/share/services/heapDumper.cpp Fri Mar 15 13:11:28 2019 > +0100 > @@ -958,6 +958,11 @@ > // creates HPROF_GC_INSTANCE_DUMP record for the given object > void DumperSupport::dump_instance(DumpWriter* writer, oop o) { > Klass* k = o->klass(); > + if (k->java_mirror() == NULL) { > + // Ignoring this object since the corresponding java mirror is not > loaded. > + // Might be a dormant archive object. > + return; > + } > > writer->write_u1(HPROF_GC_INSTANCE_DUMP); > writer->write_objectID(o); > > > Thanks! > > /Claes > > [1] https://bugs.openjdk.java.net/browse/JDK-8214756 > -- Thanks, Jc