RFR: 8373497: SpinCriticalSection should use SpinYield
Anton Artemov
aartemov at openjdk.org
Thu Dec 11 09:17:58 UTC 2025
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.
-------------
Commit messages:
- 8373497: SpinCriticalSection should use SpinYield
Changes: https://git.openjdk.org/jdk/pull/28763/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28763&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373497
Stats: 18 lines in 1 file changed: 3 ins; 14 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/28763.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28763/head:pull/28763
PR: https://git.openjdk.org/jdk/pull/28763
More information about the hotspot-dev
mailing list