RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v6]
Coleen Phillimore
coleenp at openjdk.org
Tue Nov 18 13:46:10 UTC 2025
On Tue, 18 Nov 2025 04:58:10 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8366671: Removed redundant include.
>
> src/hotspot/share/runtime/objectMonitor.cpp line 320:
>
>> 318: check_object_context();
>> 319: if (_object_strong.is_empty()) {
>> 320: auto setObjectStrongLambda = [&](OopHandle& object_strong, const WeakHandle& object) {
>
> I don't understand why we need the complexity of the `SpinSingleSection` and use of lambda's/functors.
>
> 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?)
I think we agree about SpinSingleSection that it's sort of overkill we shouldn't add it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2538280821
More information about the hotspot-dev
mailing list