RFR: 8373497: SpinCriticalSection should use SpinYield
Coleen Phillimore
coleenp at openjdk.org
Fri Dec 12 13:13:52 UTC 2025
On Thu, 11 Dec 2025 09:09:05 GMT, Anton Artemov <aartemov 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!!
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28763#pullrequestreview-3571764534
More information about the hotspot-dev
mailing list