RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data (Original revision)

Kelvin Nilsen kdnilsen at openjdk.org
Fri Jan 16 19:43:16 UTC 2026


This is the originally proposed PR to address https://bugs.openjdk.org/browse/JDK-8353115
At the time this proposed PR was reviewed, a suggestion for refactoring was proposed and explored, resulting in https://github.com/openjdk/jdk/pull/24319

Though the refactored implementation may have some desirable characteristics, this original implementation appears to have better performance.

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.

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

Commit messages:
 - reset _mixed_candidate_garbage_words in recycle_internal()
 - Merge remote-tracking branch 'jdk/master' into revA-fix-live-data-for-mixed-evac-candidates
 - touch file to force retests
 - Merge remote-tracking branch 'jdk/master' into revA-fix-live-data-for-mixed-evac-candidates
 - fix asserts
 - Use shenandoah_assert_safepoint() instead of is_at_safepoint()
 - Track live and garbage for mixed-evac regions

Changes: https://git.openjdk.org/jdk/pull/29127/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29127&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8353115
  Stats: 52 lines in 5 files changed: 52 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/29127.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29127/head:pull/29127

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


More information about the shenandoah-dev mailing list