Currently, MetaspaceClosure::push supports only the following variants:
MetaspaceClosure* it = ...;
Klass* o = ...; it->push(&o);
Array<int>* a1 = ...; it->push(&a1);
Array<Annotation*>* a2 = ...; it->push(&a2);
In Valhalla, support is needed for the following variant (Annotation is a subtype of MetaspaceObj):
Array<Annotation>* a3 = ...; it->push(&a3);
This will allow CDS to make a copy of this array, as well as relocating all the pointers embedded in the elements of this array.
MetaspaceClosure* it = ...;
Klass* o = ...; it->push(&o);
Array<int>* a1 = ...; it->push(&a1);
Array<Annotation*>* a2 = ...; it->push(&a2);
In Valhalla, support is needed for the following variant (Annotation is a subtype of MetaspaceObj):
Array<Annotation>* a3 = ...; it->push(&a3);
This will allow CDS to make a copy of this array, as well as relocating all the pointers embedded in the elements of this array.