RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v15]
Anton Artemov
aartemov at openjdk.org
Mon Dec 8 16:07:29 UTC 2025
On Mon, 8 Dec 2025 12:56:53 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.
>
> Anton Artemov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/master' into JDK-8366671-refactor-spin-acquire-spin-release
> - 8366671: Use non-safe current_or_null.
> - Update src/hotspot/share/runtime/objectMonitor.cpp
>
> Co-authored-by: Coleen Phillimore <coleen.phillimore at oracle.com>
> - 8366671: Added NoSafepointVerifier
> - 8366671: Modified the comment.
> - Merge remote-tracking branch 'origin/master' into JDK-8366671-refactor-spin-acquire-spin-release
> - 8366671: Addressed reviewer's comments.
> - 8366671: Addressed reviewers' comments.
> - 8366671: Addressed reviewer's comments
> - 8366671: Removed redundant include.
> - ... and 9 more: https://git.openjdk.org/jdk/compare/7093e1a5...7e0cf5a5
Thanks for reviews, let's
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28264#issuecomment-3627737570
More information about the hotspot-dev
mailing list