[master] RFR: Implement sliding forwarding scheme that preserves upper header bits [v10]

Roman Kennke rkennke at openjdk.java.net
Wed Jun 16 18:42:54 UTC 2021


> The current way of storing forwarding information - by storing the forwardee address into the header - poses a problem for sliding collectors: it overrides the upper bits that keep the (compressed) Klass*. Sliding collectors have no way to recover the Klass*, and therefore need a different forwarding scheme that preserves the upper bits. I propose a scheme that compresses the forwarding pointer and by taking advantage of the fact that each region only ever forwards to at most two other regions (when dividing the heap into equal-sized logical regions), it can address all of the heap, regardless of its size. This obviouly works well with regionalized collectors, but it also works with contiguous-heap collectors like serial or parallel GC. The latter would divide the heap into logical regions sized by 4G (or single region if heap is smaller than that). Notice that evacuating and scavenging collectors don't have this problem: they can safely stomp over the from-space copy of objects, t
 he Klass* information is preserved in the to-space copy.
> 
> This implementation is for Shenandoah-only, I will follow-up with implementations for other collectors.
> 
> Testing:
> - [x] manual testing with +passive and -degen-gc
> - [x] hotspot_gc_shenandoah
> - [x] tier1
> - [x] tier2
> - [x] tier1 (x86_32)

Roman Kennke has updated the pull request incrementally with five additional commits since the last revision:

 - Fixes for G1
 - SlidingForwarding support for G1GC
 - Const-ness fixes for sliding forwarding in Serial GC
 - Build fixes for templated SlidingForwarding
 - Use sliding forwarding in Serial GC

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

Changes:
  - all: https://git.openjdk.java.net/lilliput/pull/8/files
  - new: https://git.openjdk.java.net/lilliput/pull/8/files/171a2fc4..88d6cac0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=lilliput&pr=8&range=09
 - incr: https://webrevs.openjdk.java.net/?repo=lilliput&pr=8&range=08-09

  Stats: 134 lines in 23 files changed: 88 ins; 5 del; 41 mod
  Patch: https://git.openjdk.java.net/lilliput/pull/8.diff
  Fetch: git fetch https://git.openjdk.java.net/lilliput pull/8/head:pull/8

PR: https://git.openjdk.java.net/lilliput/pull/8


More information about the lilliput-dev mailing list