RFR: Adjustments to derived-pointer handling to make it work with Shenandoah GC

Roman Kennke rkennke at openjdk.java.net
Fri Feb 12 21:01:01 UTC 2021


This adjusts derived-pointer handling to make it work with Shenandoah GC:
- Much of it adds INCLUDE_SHENANDOAHGC and/or UseShenandoahGC where INCLUDE_ZGC and/or UseZGC already is to take the same code paths. We need to think about proper GC interfaces there.
- In InstanceStackChunkKlass::verify(..) I changed the first load of oops to load from a local variable instead of the real field. I had troubles there because one side-effect of loading with Shenandoah barriers is that the barriers would update the field with the correct to-space reference. This throws off derived pointers which are checked later in the method.
- Similar situation later: when loading the base of derived pointer, we may get back an updated base pointer, while the derived pointer is not yet there. Loading the raw memory seems the right way to do it.

Testing:
 - [x] java/lang/Continuation (-XX:+UseShenandoahGC -XX:ShenandoahGCMode=aggressive)
 - [x] java/lang/Thread/virtual (-XX:+UseShenandoahGC -XX:ShenandoahGCMode=aggressive)
 - [x] java/lang/Continuation (-XX:+UseZGC -XX:ZCollectionInterval=0.01)
 - [x] java/lang/Thread/virtual (-XX:+UseZGC -XX:ZCollectionInterval=0.01)

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

Commit messages:
 - Fix bad #if INCLUDE_ZGC
 - Adjustments to derived-pointer handling to make it work with Shenandoah GC

Changes: https://git.openjdk.java.net/loom/pull/30/files
 Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=30&range=00
  Stats: 17 lines in 2 files changed: 10 ins; 0 del; 7 mod
  Patch: https://git.openjdk.java.net/loom/pull/30.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/30/head:pull/30

PR: https://git.openjdk.java.net/loom/pull/30


More information about the loom-dev mailing list