RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v6]
Anton Artemov
aartemov at openjdk.org
Wed Nov 19 14:09:55 UTC 2025
On Tue, 18 Nov 2025 14:53:42 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> +1 on leaving the code as it was. This makes it harder to read IMO. Also as David points out there is no spinning here so using a SpinSingleSection class would add extra confusion.
>
>>This seems like try-lock usage, though I'm not at all sure why (i.e. if we don't get the lock who is taking care of making a strong reference?)
>>
> This lock is only used here, so if the try-lock fails somebody else already grabbed it and that thread will create the strong reference (if not created already).
Agreed. That SpinSingleSection is removed, the code in the ObjectMonitor is restored.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2542156074
More information about the hotspot-dev
mailing list