RFR: 8330414: GenShen: Class unloading requires old regions be made parseable

William Kemper wkemper at openjdk.org
Fri Apr 19 00:04:34 UTC 2024


Even when the generational mode is using the mark bitmap to scan the remembered set's card tables, the card table offsets may refer to unmarked objects. If the classes referred to by these unmarked objects have been reloaded in metaspace, the class pointer may no longer be valid or may refer to a class with a different size than expected by the parser. This may cause the remembered set scan to miss oops that should be included in the root set.

GenShen will attempt to make these old regions parseable after mixed evacuations have completed, but only if no GCs have been requested. When GenShen is under memory pressure and running back-to-back GCs, it may not make these old regions parseable before the remembered set is scanned again. This change adds an uninterruptible phase to make old regions parseable when a global cycle has unloaded classes.

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

Commit messages:
 - Replace coalesce and fill heap region closure with regular worker
 - Fix phase timing and reports for coalesce and fill
 - Move old gc state transition logic and fix it
 - Do not coalesce and fill again after mixed collections that follow a global collection
 - Add comment
 - Merge remote-tracking branch 'shenandoah/master' into coalesce-after-class-unloading
 - Degen cycles should also check if old regions are parseable
 - WIP: Fill old regions at end of global cycle
 - Merge remote-tracking branch 'shenandoah/master' into coalesce-after-class-unloading
 - Assert that old regions are parseable before scanning
 - ... and 1 more: https://git.openjdk.org/shenandoah/compare/ae15774c...3fa9bef4

Changes: https://git.openjdk.org/shenandoah/pull/424/files
  Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=424&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330414
  Stats: 296 lines in 19 files changed: 205 ins; 57 del; 34 mod
  Patch: https://git.openjdk.org/shenandoah/pull/424.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/424/head:pull/424

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


More information about the shenandoah-dev mailing list