RFR: 8259214: MetaspaceClosure support for Arrays of MetaspaceObj [v5]

Ioi Lam iklam at openjdk.java.net
Fri Jan 22 22:51:04 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:

 - Merge branch 'master' into 8259214-MetaspaceClosure-support-for-Arrays-of-MetaspaceObj
 - Fixed typos per @calvinccheung review comments
 - Remove RefMatcher and go back to overloaded template functions for push(...)
 - Updated SFINAE per @kimbarrett offline comments; added test case for disallowed types
 - fixed typo
 - 8259214: MetaspaceClosure support for Arrays of MetaspaceObj

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1995/files
  - new: https://git.openjdk.java.net/jdk/pull/1995/files/84074148..79dd6627

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1995&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1995&range=03-04

  Stats: 63721 lines in 1572 files changed: 26967 ins; 27758 del; 8996 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