Integrated: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease

Anton Artemov aartemov at openjdk.org
Mon Dec 8 16:09:47 UTC 2025


On Wed, 12 Nov 2025 11:17:22 GMT, Anton Artemov <aartemov at openjdk.org> wrote:

> Hi, 
> 
> please consider the following changes:
> 
> In this PR `Thread::SpinAcquire()` and `Thread::SpinRelease()` methods are refactored into a utility class `SpinCriticalSection`. The motivation is to make it easier for developers to use this lightweight synchronization mechanism in the codebase. The two aforementioned methods were used in JFR to create short critical sections with a helper class, but that was not the case for the object monitor code. 
> 
> Tested in tiers 1 - 5.

This pull request has now been integrated.

Changeset: 355755d3
Author:    Anton Artemov <aartemov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/355755d35de5c3155d1ea8d1afdd0debe5296a13
Stats:     262 lines in 12 files changed: 143 ins; 107 del; 12 mod

8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease

Co-authored-by: Axel Boldt-Christmas <aboldtch at openjdk.org>
Reviewed-by: coleenp, kbarrett, dholmes, aboldtch

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

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


More information about the hotspot-dev mailing list