RFR: 8259214: MetaspaceClosure support for Arrays of MetaspaceObj [v3]
Ioi Lam
iklam at openjdk.java.net
Fri Jan 15 19:46:22 UTC 2021
> 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`.
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
Updated SFINAE per @kimbarrett offline comments; added test case for disallowed types
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1995/files
- new: https://git.openjdk.java.net/jdk/pull/1995/files/6781e383..0f7cf37a
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1995&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1995&range=01-02
Stats: 38 lines in 1 file changed: 22 ins; 0 del; 16 mod
Patch: https://git.openjdk.java.net/jdk/pull/1995.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1995/head:pull/1995
PR: https://git.openjdk.java.net/jdk/pull/1995
More information about the hotspot-dev
mailing list