RFR: 8378293: GenShen: Simplify selection of aged regions

Kelvin Nilsen kdnilsen at openjdk.org
Tue Feb 24 15:56:37 UTC 2026


On Fri, 20 Feb 2026 00:59:05 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Aged regions with a sufficient amount of live data may be promoted in place. Other aged regions with insufficient live data may have their objects evacuated by promotion. These regions bypass normal collection set selection. For historical reasons, this process used an intermediate array to pass these regions between components. After recent refactorings, this array is no longer necessary and other simplifications can be made.
> 
> There aren't meant to be any behavior changes in this PR. The main change here is that instead of using  a separate array for preselected regions, we just put them straight in the collection set. This change also no longer forces an evacuation/update-refs cycle when we _only_ have in-place-promotions (these can be done by an abbreviated cycle).

Marked as reviewed by kdnilsen (Committer).

src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp line 294:

> 292:       }
> 293:     } else if (region->is_trash()) {
> 294:       // Count in just trashed humongous continuation regions

This comment is a bit unclear to me.  Same "confusing" comment shows up in shenandoahHeuristics.cpp.  Maybe I'm just not "parsing" the sentence in the intended way.  Not a big deal...

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

PR Review: https://git.openjdk.org/jdk/pull/29832#pullrequestreview-3848798766
PR Review Comment: https://git.openjdk.org/jdk/pull/29832#discussion_r2847961754


More information about the shenandoah-dev mailing list