Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8291302: ARM32: nmethod entry barriers support #11442

Closed
wants to merge 5 commits into from

Conversation

voitylov
Copy link

@voitylov voitylov commented Nov 30, 2022

This PR implements nmethod entry barriers for ARM32. It has already been implemented for other ports and is related with JDK-8290025 "Remove the Sweeper".


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11442

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 30, 2022

👋 Welcome back avoitylov! 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 openjdk bot added the rfr Pull request is ready for review label Nov 30, 2022
@openjdk
Copy link

openjdk bot commented Nov 30, 2022

@voitylov 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 hotspot hotspot-dev@openjdk.org label Nov 30, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 30, 2022

Webrevs

@voitylov
Copy link
Author

Errors in pre-submit tests are clearly unrelated, GHA can't download the bundles for linux-x86:

Error: Unable to find an artifact with the name: bundles-linux-x86

Copy link
Contributor

@fisk fisk left a comment

Choose a reason for hiding this comment

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

When you call the nmethod entry barrier slow path, floating point arguments are live, but can get clobbered by the C++ runtime. You need to save them. That's probably why you can't print in the slow path without crashing.

Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

Hi Aleksei,
thanks for picking up the work on ARM32 support of nmethod entry barriers.
Is my assumption correct that ARM32 supports neither ZGC nor ShenandoahGC? If so you could simplify the implementation.
Thanks, Richard.

@voitylov
Copy link
Author

voitylov commented Dec 5, 2022

@fisk @reinrich Thank you for your suggestions. This iteration saves floating registers and can successfully log deoptimization. I'd prefer to keep the code in line with the same code for other ports and not carve out memory barriers by hand, if @reinrich would agree. This also allows a more straightforward port for additional GCs in the future, should there be any demand.

@TheRealMDoerr
Copy link
Contributor

Please note that the memory barrier has caused a performance regression on PPC64 (as on AArch64): https://bugs.openjdk.org/browse/JDK-8295069
I'd probably assert nmethod_patching_type() == NMethodPatchingType::stw_instruction_and_data_patch instead of emitting a memory barrier because LoadLoad may or may not be strong enough depending on usage (e.g. generational ZGC uses instruction patching as well).

@voitylov
Copy link
Author

voitylov commented Dec 5, 2022

The removed membar can be added later if and when support for other GCs is added to ARM32.

@voitylov voitylov requested review from fisk and removed request for fisk December 14, 2022 12:51
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

LGTM, but I'm not an arm 32 expert.

@openjdk
Copy link

openjdk bot commented Dec 23, 2022

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

8291302: ARM32: nmethod entry barriers support

Reviewed-by: eosterlund, rrich, mdoerr, aph

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 233 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.

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 (@fisk, @reinrich, @TheRealMDoerr, @theRealAph) 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 added the ready Pull request is ready to be integrated label Dec 23, 2022
Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

The changes look good to me. I'm not familiar with arm32 details, though.
You might want to open an RFE to port JDK-8290700 to arm32.
Thanks, Richard.

@bulasevich
Copy link
Contributor

Looks good!

@voitylov
Copy link
Author

@TheRealMDoerr @reinrich @bulasevich thank you for your reviews!

@voitylov
Copy link
Author

@fisk do you have any further comments? I'd like to have this in to continue working on Loom.

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Please consider my cleanups.

@voitylov
Copy link
Author

Thanks @theRealAph . Your suggestions for cleanups are addressed.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr 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 the cleanup! Still looks good. I think the PR is ready for integration. You have 3 reviews and the concerns were addressed.

Copy link
Contributor

@fisk fisk left a comment

Choose a reason for hiding this comment

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

Looks good.

@voitylov
Copy link
Author

voitylov commented Jan 3, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jan 3, 2023
@openjdk
Copy link

openjdk bot commented Jan 3, 2023

@voitylov
Your change (at version aa7fc86) is now ready to be sponsored by a Committer.

@TheRealMDoerr
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 3, 2023

Going to push as commit 245f0cf.
Since your change was applied there have been 233 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 Jan 3, 2023
@openjdk openjdk bot closed this Jan 3, 2023
@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 Jan 3, 2023
@openjdk
Copy link

openjdk bot commented Jan 3, 2023

@TheRealMDoerr @voitylov Pushed as commit 245f0cf.

💡 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
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
7 participants