RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data [v8]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Sep 16 20:10:42 UTC 2025


> The existing implementation of get_live_data_bytes() and git_live_data_words() does not always behave as might be expected.  In particular, the value returned ignores any allocations that occur subsequent to the most recent mark effort that identified live data within the region.  This is typically ok for young regions, where the amount of live data determines whether a region should be added to the collection set during the final-mark safepoint.
> 
> However, old-gen regions that are placed into the set of candidates for mixed evacuation are more complicated.  In particular, by the time the old-gen region is added to a mixed evacuation, its live data may be much larger than at the time concurrent old marking ended.
> 
> This PR provides comments to clarify the shortcomings of the existing functions, and adds new functions that provide more accurate accountings of live data for mixed-evacuation candidate regions.

Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 41 commits:

 - Merge remote-tracking branch 'jdk/master' into fix-live-data-for-mixed-evac-candidates
 - Fix uninitialized variable
 - Remove deprecation conditional compiles
 - Adjust candidate live memory for each mixed evac
 - Refactor for better abstraction
 - Fix set_live() after full gc
 - Fix garbage_before_padded_for_promote()
 - Experiment 2: refinements to reduce regressions
 - Experiment with reviewer suggestion
   
   Redefine the way ShenandoahHeapRegion::get_live_data_<type> works to
   simplify changes.
 - Track live and garbage for mixed-evac regions
 - ... and 31 more: https://git.openjdk.org/jdk/compare/b75e35cb...d486a218

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

Changes: https://git.openjdk.org/jdk/pull/24319/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24319&range=07
  Stats: 111 lines in 11 files changed: 76 ins; 24 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/24319.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24319/head:pull/24319

PR: https://git.openjdk.org/jdk/pull/24319


More information about the hotspot-gc-dev mailing list