Skip to content

Conversation

@kimbarrett
Copy link

@kimbarrett kimbarrett commented Dec 27, 2025

Please review this change to convert HotSpot gtests to use Atomic rather
than directly using AtomicAccess.

test_atomicAccess.cpp is, of course, not subject to this conversion.

test_globalCounter.cpp is also not included in this conversion. The other
conversions were straight forward. This test is less so, and I decided I
needed to spend more time studying it, so have left it for followup work.

The conversion of each test is a separate commit, in case that makes it easier
to review.

Testing: mach5 tier1


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8374350: Convert hotspot gtests to use Atomic<T> (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29001/head:pull/29001
$ git checkout pull/29001

Update a local copy of the PR:
$ git checkout pull/29001
$ git pull https://git.openjdk.org/jdk.git pull/29001/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29001

View PR using the GUI difftool:
$ git pr show -t 29001

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29001.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 27, 2025

👋 Welcome back kbarrett! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 27, 2025

@kimbarrett This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8374350: Convert hotspot gtests to use Atomic<T>

Reviewed-by: aboldtch

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 26 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Dec 27, 2025

@kimbarrett The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 27, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 27, 2025

Webrevs

Copy link
Member

@xmas92 xmas92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

Just wondering if we should use GrowableArray instead of NEW/FREE macros and the placement new operator. Or would you rather have such a change as a separate RFE?

}

bool volatile* _do_work_called_by;
Atomic<bool>* _do_work_called_by;
Copy link
Member

@xmas92 xmas92 Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use GrowableArrayCHeap<Atomic<bool>, MemTag::mtInternal> instead, and skip the manual destruction (and element construction)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right Atomic are non copyable ofc. Ignore this. :)

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 2, 2026
@kimbarrett
Copy link
Author

GHA linux-x64-debug build failed because out of disk space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants