Skip to content

Conversation

@dafedafe
Copy link
Contributor

@dafedafe dafedafe commented May 19, 2025

TestG1BarrierGeneration.testGetAndSet* tests fail after JDK-8351569. These tests check that VarHandle::getAndSet with G1 a particular GetAndSetP or GetAndSetN node is created with a barrier before and after.
JDK-8351569 refactored Unsafe::getAndSet (which is used by VarHandle::getAndSet) to take value-classes into account, which implies that checks must be introduced to see if the target and argument objects are value-classes. This is done with a new overloaded getAndSet method that is now called instead of the old one. This method is not intrinsified (only inlined) and doesn't result in a GetAndSet node. It instead relies on the compareAndSet method (which gets intrinsified) and results in a CompareAndSwap node.

As the goal of the test is mainly to check for G1 barrier creation, the sensible fix for now seems to be to modify the TestG1BarrierGeneration.testGetAndSet* tests to make them check for CompareAndSwap instead of GetAndSet nodes.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1462

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1462.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 19, 2025

👋 Welcome back dfenacci! A progress list of the required criteria for merging this PR into lworld 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 May 19, 2025

@dafedafe 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:

8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18

Reviewed-by: thartmann

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 258 new commits pushed to the lworld 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title JDK-8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18 8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18 May 19, 2025
@openjdk
Copy link

openjdk bot commented May 19, 2025

@dafedafe this pull request can not be integrated into lworld due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8343420
git fetch https://git.openjdk.org/valhalla.git lworld
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge lworld"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 19, 2025
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label May 19, 2025
@dafedafe dafedafe marked this pull request as ready for review May 19, 2025 11:45
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 19, 2025
@mlbridge
Copy link

mlbridge bot commented May 19, 2025

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Thanks for investigating this Damon! The fix looks good to me.

@dafedafe
Copy link
Contributor Author

Thanks for the review @TobiHartmann!

@dafedafe
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 22, 2025
@openjdk
Copy link

openjdk bot commented May 22, 2025

@dafedafe
Your change (at version 74bbcc1) is now ready to be sponsored by a Committer.

@TobiHartmann
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented May 22, 2025

Going to push as commit 5fb6b8e.
Since your change was applied there have been 258 commits pushed to the lworld branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 22, 2025
@openjdk openjdk bot closed this May 22, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels May 22, 2025
@openjdk
Copy link

openjdk bot commented May 22, 2025

@TobiHartmann @dafedafe Pushed as commit 5fb6b8e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

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

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants