RFR: 8339616: GenShen: Introduce new state to distinguish promote-in-place phase as distinct from concurrent evacuation

William Kemper wkemper at openjdk.org
Fri Sep 20 21:09:21 UTC 2024


The generational mode for Shenandoah is able to promote regions in place (effectively moving an entire region of live objects, without evacuating any objects). It does this during a normal evacuation phase. However, in some cases, Shenandoah may choose to skip the evacuation phase, _even when there are entire regions to promote_. Prior to this PR, Shenandoah would essentially force itself into an evacuation phase, with nothing to evacuate. Though this was expedient, it cause all manner of knock-on effects and unintended consequences with barriers and asserts and the state of the heap. Here, we have reverted that business and created a path for this special "only doing in place promotions" cycle that does not cause the heap to expect to evacuate objects or find forwarding pointers in them.

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

Commit messages:
 - Handle cancellation corner case, improve names and comments
 - Change size verification mode when there are only in-place promotions after final mark
 - Do not treat promote-in-place only as an evacuation phase
 - Merge remote-tracking branch 'shenandoah/master' into restore-barrier-fwd-assert
 - Remove misleading comment, restore original assert

Changes: https://git.openjdk.org/shenandoah/pull/503/files
  Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=503&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339616
  Stats: 86 lines in 8 files changed: 48 ins; 18 del; 20 mod
  Patch: https://git.openjdk.org/shenandoah/pull/503.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/503/head:pull/503

PR: https://git.openjdk.org/shenandoah/pull/503


More information about the shenandoah-dev mailing list