RFR: 8373497: SpinCriticalSection should use SpinYield

Anton Artemov aartemov at openjdk.org
Mon Dec 15 08:43:08 UTC 2025


On Fri, 12 Dec 2025 13:10:59 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Hi, please consider the following changes:
>> 
>> The original code of `Thread::SpinAqcuire()` was moved into a RAII object `SpinCriticalSection` in https://bugs.openjdk.org/browse/JDK-8366671
>> 
>> It to a great extent duplicates the code of the `SpinYield` class, which is more flexible. In this PR the duplication is removed as `SpinCriticalSection` now makes uses of  `SpinYield`.
>> 
>> Tested in tiers 1-3.
>> 
>> Extended performance testing has shown that the change is neutral.
>
> Thank you!!

Thanks for reviews @coleenp and @dholmes-ora !

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

PR Comment: https://git.openjdk.org/jdk/pull/28763#issuecomment-3654435807


More information about the hotspot-dev mailing list