Integrated: 8373497: SpinCriticalSection should use SpinYield

Anton Artemov aartemov at openjdk.org
Mon Dec 15 08:43:10 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.

This pull request has now been integrated.

Changeset: 5141e1a4
Author:    Anton Artemov <aartemov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5141e1a4f4ef7499ddd8684469d8038fd75403d2
Stats:     18 lines in 1 file changed: 3 ins; 14 del; 1 mod

8373497: SpinCriticalSection should use SpinYield

Reviewed-by: dholmes, coleenp

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

PR: https://git.openjdk.org/jdk/pull/28763


More information about the hotspot-dev mailing list