Integrated: 8259214: MetaspaceClosure support for Arrays of MetaspaceObj

Ioi Lam iklam at openjdk.java.net
Fri Jan 22 22:51:07 UTC 2021


On Fri, 8 Jan 2021 00:33:52 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> 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 change will allow CDS to make a copy of this array, as well as relocating all the pointers embedded in the elements of this array. See a test case in test_metaspaceClosure.cpp.
> 
> I also cleaned up the code (with help from @kimbarrett) to use SFINAE to dispatch from `MetaspaceClosure::push` to the different subtypes of `MetaspaceClosure::Ref`.

This pull request has now been integrated.

Changeset: aa57d07c
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/aa57d07c
Stats:     251 lines in 2 files changed: 203 ins; 9 del; 39 mod

8259214: MetaspaceClosure support for Arrays of MetaspaceObj

Reviewed-by: fparain, ccheung

-------------

PR: https://git.openjdk.java.net/jdk/pull/1995


More information about the hotspot-dev mailing list