Skip to content

8384080: Shenandoah: Simplify C1 CAS barriers#31068

Open
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8384080-shenandoah-cas-c1-barriers
Open

8384080: Shenandoah: Simplify C1 CAS barriers#31068
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8384080-shenandoah-cas-c1-barriers

Conversation

@shipilev
Copy link
Copy Markdown
Member

@shipilev shipilev commented May 7, 2026

In Shenandoah LBE, we have switched to a more succinct way to deal with concurrent evacuation false negatives in atomics: do the fix up early on, thus avoiding any need for CAS retry logic.

This one handles the C1 side. Since we no longer have Shenandoah-specific LIR nodes, and we do not call into platform-specific ShenandoahBarrierSetAssembler from their respective emits, this allows us to do everything in shared code, greatly reducing platform-specific implementations. The barrier bindings follow the shape we did in native barrier set, JDK-8383810.

Additional testing:

  • Linux x86_64 server fastdebug, hotspot_gc_shenandoah
  • Linux x86_64 server fastdebug, all with -XX:+UseShenandoahGC -XX:TieredStopAtLevel=1
  • Linux AArch64 server fastdebug, all with -XX:+UseShenandoahGC -XX:TieredStopAtLevel=1
  • Linux x86_64 server release, jcstress with -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
  • Linux AArch64 server release, jcstress with -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive


Progress

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

Issue

  • JDK-8384080: Shenandoah: Simplify C1 CAS barriers (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31068

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 7, 2026

👋 Welcome back shade! 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
Copy Markdown

openjdk Bot commented May 7, 2026

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

8384080: Shenandoah: Simplify C1 CAS barriers

Reviewed-by: kdnilsen, rkennke

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 openjdk Bot added hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels May 7, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot
  • shenandoah

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

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 7, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 7, 2026

Webrevs

@shipilev
Copy link
Copy Markdown
Member Author

shipilev commented May 8, 2026

Looks like it passes the tests. @rkennke, @earthling-amzn, @kdnilsen -- please take a look. I would like to integrate it early next week, if nothing blocking appears. This would allow us to eliminate SBSA::cmpxchg_oop along with C2 CAS barrier rewrite in LBE, as LBE would eliminate the last use of it.

Copy link
Copy Markdown
Contributor

@kdnilsen kdnilsen left a comment

Choose a reason for hiding this comment

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

Thanks.

Copy link
Copy Markdown
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

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

This is a nice simplification! The changes look good!

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants