RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v10]
Anton Artemov
aartemov at openjdk.org
Mon Dec 1 08:43:49 UTC 2025
> 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 14 additional commits since the last revision:
- 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.
- 8366671: Removed the file mistakenly checked in.
- 8366671: Fixed build problem.
- 8366671: Addressed reviewer's comments.
- Merge remote-tracking branch 'origin/master' into JDK-8366671-refactor-spin-acquire-spin-release
- Merge remote-tracking branch 'origin/master' into JDK-8366671-refactor-spin-acquire-spin-release
- ... and 4 more: https://git.openjdk.org/jdk/compare/77430bb9...b2483bf6
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28264/files
- new: https://git.openjdk.org/jdk/pull/28264/files/4952da2c..b2483bf6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28264&range=09
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28264&range=08-09
Stats: 80250 lines in 1334 files changed: 53885 ins; 17646 del; 8719 mod
Patch: https://git.openjdk.org/jdk/pull/28264.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28264/head:pull/28264
PR: https://git.openjdk.org/jdk/pull/28264
More information about the hotspot-dev
mailing list