RFR: 8356667: GenShen: Eliminate races with ShenandoahFreeSet::available() [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon May 12 23:22:33 UTC 2025
On Mon, 12 May 2025 23:14:59 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 235:
>>
>>> 233:
>>> 234: // Acquire heap lock and return available_in, assuming heap lock is not acquired by the caller.
>>> 235: inline size_t available_in_under_lock(ShenandoahFreeSetPartitionId which_partition) const {
>>
>> This name confuses me: `available_in_under_lock`. Should it be called `available_without_lock` or `available_no_lock`? Or, switch it with `available_in` (which asserts that the heap lock is held). I see that it takes the lock, but this is only to make the assertion.
>
> Thanks for review and comments. I'll change the name. It follows a pattern that is admittedly very confusing...
changing to available_in_not_locked()
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25165#discussion_r2085660231
More information about the hotspot-gc-dev
mailing list