Skip to content

Conversation

JohnTortugo
Copy link
Contributor

@JohnTortugo JohnTortugo commented Aug 29, 2025

Please, review this patch to make nmethod entry barriers use conc-instruction-and-data-patch fence mechanics when ShenandoahGC is being used on AArch64. The patch also removes (including from JVMCI interface) the old constant that was being used only by Shenandoah on AArch64.

The patch has been tested with functional and performance benchmarks on AArch64. Improvements in DaCapo and Renaissance benchmarks can be as high as 30%. Maximum critical Jops in SPEC improved by ~10%.


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-8364936: Shenandoah: Switch nmethod entry barriers to conc_instruction_and_data_patch (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26999

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 29, 2025

👋 Welcome back cslucas! 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 Aug 29, 2025

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

8364936: Shenandoah: Switch nmethod entry barriers to conc_instruction_and_data_patch

Reviewed-by: fyang, dzhang, kdnilsen, wkemper

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 229 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 changed the title JDK-8364936: Shenandoah: Switch nmethod entry barriers to conc_instruction_and_data_patch 8364936: Shenandoah: Switch nmethod entry barriers to conc_instruction_and_data_patch Aug 29, 2025
@openjdk
Copy link

openjdk bot commented Aug 29, 2025

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

  • graal
  • 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.

@mlbridge
Copy link

mlbridge bot commented Aug 29, 2025

Webrevs

@shipilev
Copy link
Member

shipilev commented Aug 29, 2025

I see virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; } in Shenandoah PPC64 and RISC-V barrier sets as well. Those should likely go away as well?

@DingliZhang
Copy link
Member

DingliZhang commented Aug 29, 2025

Thanks for this patch! I've made similar changes on RISC-V.
Could you please add those as well? DingliZhang@495b07f
I've tested the hotspot_gc_shenandoah on the SG2042 with fastdebug and found no failures.
SPECjbb on the SG2042 is ongoing. I'll update the results later.

PS: max-jOPS in SPEC improved by ~5% and critical-jOPS in SPEC improved by ~3% on SG2042.

Copy link
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.

Thank you for doing this. Looks good to me.

Copy link
Contributor

@earthling-amzn earthling-amzn left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 2, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 3, 2025
Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

I just checked the RISC-V part. LGTM. Thanks.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 3, 2025
Copy link
Member

@DingliZhang DingliZhang left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@JohnTortugo
Copy link
Contributor Author

@TheRealMDoerr - @shipilev mentioned in private that you have access to PPC machines; could you please help testing this patch on PPC?

@JohnTortugo
Copy link
Contributor Author

@TheRealMDoerr - gentle nudge.

@JohnTortugo
Copy link
Contributor Author

@dbriemann - do you have access to a PPC machine that you can use to test this patch? TIA.

@TheRealMDoerr
Copy link
Contributor

This change is a NOP for PPC64 since we're generating the same code for both patching types. GHA cross build has passed, so there's nothing to worry regarding PPC64.

@JohnTortugo
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 8, 2025

Going to push as commit 81a1e8e.
Since your change was applied there have been 309 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 8, 2025
@openjdk openjdk bot closed this Sep 8, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 8, 2025
@openjdk openjdk bot removed the rfr Pull request is ready for review label Sep 8, 2025
@openjdk
Copy link

openjdk bot commented Sep 8, 2025

@JohnTortugo Pushed as commit 81a1e8e.

💡 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
Development

Successfully merging this pull request may close these issues.

7 participants