RFR: 8348400: GenShen: assert(ShenandoahHeap::heap()->is_full_gc_in_progress() || (used_regions_size() <= _max_capacity)) failed: Cannot use more than capacity # [v2]
William Kemper
wkemper at openjdk.org
Tue Mar 25 20:50:14 UTC 2025
On Tue, 25 Mar 2025 19:50:38 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert "Do not enforce size constraints on generations"
>>
>> This reverts commit 11ff0677449fa6749df8830f4a03f1c7861ba314.
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1324:
>
>> 1322: _partitions.move_from_partition_to_partition(unusable_trash,
>> 1323: ShenandoahFreeSetPartitionId::OldCollector,
>> 1324: ShenandoahFreeSetPartitionId::Mutator, region_capacity);
>
> Shouldn't `region_capacity` argument be the free space in the unusable trash region? Wouldn't that be 0 (else why "unusable"?)
Yes, good catch. However, it won't be `0` because this region is only _temporarily_ unusable while concurrent weak roots is in progress. Elsewhere, when the freeset is rebuilt, the `alloc_capacity` of trash regions is considered equal to the region size (regardless if weak roots is in progress).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23998#discussion_r2012916069
More information about the hotspot-gc-dev
mailing list