RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v12]
David Holmes
dholmes at openjdk.org
Thu Dec 4 19:36:05 UTC 2025
On Thu, 4 Dec 2025 12:33:02 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/utilities/spinCriticalSection.hpp line 46:
>>
>>> 44: // compared to smaller/larger types.
>>> 45: volatile int* const _lock;
>>> 46: DEBUG_ONLY(NoSafepointVerifier _nsv;)
>>
>> I thought NSV had to be used as a StackObj ?? I don't understand why it is a field of SCS.
>
> It can be a field of a StackObj too.
Okay, yes I misunderstand the purpose here. We want the NSV covering the critical section, not just the code of the SCS.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2590322392
More information about the hotspot-dev
mailing list