RFR: 8369048: GenShen: Defer ShenFreeSet::available() during rebuild [v3]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Nov 21 01:07:09 UTC 2025


On Sat, 15 Nov 2025 00:19:11 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>> 
>>  - Merge remote-tracking branch 'jdk/master' into synchronize-available-with-rebuild
>>  - update comment
>>  - Add documentation for _rebuild_lock
>>  - Hide rebuild_lock inside prepare_to_rebuild and finish_rebuild
>>  - Rename rebuild_lock()
>>  - Tighten up context for holding rebuild_lock
>>  - Remove ShenandoahFreeSet::FreeSetUnderConstruction sentinel value
>>  - Revert "revert introduction of RebuildLock"
>>    
>>    This reverts commit bec73da1dc169d391e9919203e5a406ea02a699c.
>>  - Revert "available() returns previous value if called during freeset rebuild"
>>    
>>    This reverts commit 1a5e483a4abb04b6045175e8bd4b0c11fa68cb73.
>>  - Revert "remove obsolete assertion"
>>    
>>    This reverts commit 717e7da17f03f1e52008d154fafcbbfc5f2bb20e.
>>  - ... and 7 more: https://git.openjdk.org/jdk/compare/bfc048ab...8462a290
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 790:
> 
>> 788:   inline size_t available() {
>> 789:     shenandoah_assert_not_heaplocked();
>> 790:     ShenandoahRebuildLocker locker(rebuild_lock());
> 
> May be motivate in a brief comment why we need the rebuild lock in this API, but not around the other APIs such as capacity() and used()?

Good point.  I'll address this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27612#discussion_r2548193913


More information about the hotspot-gc-dev mailing list