RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Apr 9 00:20:29 UTC 2025
On Tue, 1 Apr 2025 17:49:38 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> 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 that are going to be added or not to the collection set during 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.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp line 159:
>
>> 157:
>> 158: inline size_t ShenandoahHeapRegion::get_mixed_candidate_live_data_bytes() const {
>> 159: assert(SafepointSynchronize::is_at_safepoint(), "Should be at Shenandoah safepoint");
>
> Could we use `shenandoah_assert_safepoint` here (and other places) instead?
Good call. I'll make this change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24319#discussion_r2034198164
More information about the hotspot-gc-dev
mailing list