RFR: 8373225: GenShen: More adaptive old-generation growth heuristics [v5]

Kelvin Nilsen kdnilsen at openjdk.org
Thu Dec 11 23:15:39 UTC 2025


On Thu, 11 Dec 2025 21:22:29 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Actually, since we are using SATB protocol for old marking, the live data is measured as of the start of GC.  (We subtract out the allocations (promotions) that happen during concurrent GC.
>
> It's been my intention to use a SATB measurement of live data, but it looks like that's not yet implemented.  Would like to leave as is for now.  Will address this in a future PR.  For preservation of thoughts on how to do this:
> 1. At ShenandoahConcurrentGC::op_init_mark(), when we parallel_heap_region_iterate() over ShenandoahInitMarkUpdateRegionStateClosure, we can capture for each heap its "current usage"
> 2. At ShenandoahOldHeuristics::prepare_for_old_colections(), this is where we currently set_live_bytes_at_last_mark() to the current live in old.
> 3. At this point, I would like to compute for each old region the difference between its current old used and its old-used-at-start-of-gc (this represents new allocations (promotions) that happened during concurrent old marking).  Subtract the sum of these differences from the live memory calculated today.  This represents the true live memory at start of old marking (according to SATB theory).

used at mark start is basically top at mark start...  That simplifies things.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28561#discussion_r2612350194


More information about the hotspot-gc-dev mailing list