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

8265184: [lworld] [AArch64] Broken fast class init barrier for static calls in c2i adapter #384

Closed
wants to merge 1 commit into from

Conversation

nick-arm
Copy link
Member

@nick-arm nick-arm commented Apr 14, 2021

The tier1 test runtime/clinit/ClassInitBarrier.java fails on the lworld
branch on AArch64. The particular case that fails is calling a static
native method A.staticN() which should block in the c2i adapter until
class A's initialisation is complete but doesn't.

The check for a static method is backwards: the class initialisation
barrier code is executed when the method is not static (ANDS will set
the EQ flag if the result is zero). I'm not sure why it's like this but
fast class initialisation for AArch64 was added after the original
lworld port which also touches generate_i2c2i_adapters so maybe
something got messed up in the merge.

Fix by making the code the same as mainline.


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8265184: [lworld] [AArch64] Broken fast class init barrier for static calls in c2i adapter

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/384/head:pull/384
$ git checkout pull/384

Update a local copy of the PR:
$ git checkout pull/384
$ git pull https://git.openjdk.java.net/valhalla pull/384/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 384

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/384.diff

… calls in c2i adapter

The tier1 test runtime/clinit/ClassInitBarrier.java fails on the lworld
branch on AArch64.  The particular case that fails is calling a static
native method `A.staticN()` which should block in the c2i adapter until
class A's initialisation is complete but doesn't.

The check for a static method is backwards: the class initialisation
barrier code is executed when the method is *not* static (ANDS will set
the EQ flag if the result is zero).  I'm not sure why it's like this but
fast class initialisation for AArch64 was added after the original
lworld port which also touches generate_i2c2i_adapters so maybe
something got messed up in the merge.

Fix by making the code the same as mainline.
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2021

👋 Welcome back ngasson! 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 Apr 14, 2021

@nick-arm 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:

8265184: [lworld] [AArch64] Broken fast class init barrier for static calls in c2i adapter

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 no new commits pushed to the lworld branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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).

@mlbridge
Copy link

mlbridge bot commented Apr 14, 2021

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Looks good to me! I think the fix for JDK-8230962 broke this.

@nick-arm
Copy link
Member Author

nick-arm commented Apr 15, 2021

/integrate

@openjdk openjdk bot added the sponsor label Apr 15, 2021
@openjdk
Copy link

openjdk bot commented Apr 15, 2021

@nick-arm
Your change (at version d4b763d) is now ready to be sponsored by a Committer.

@nick-arm
Copy link
Member Author

nick-arm commented Apr 15, 2021

Thanks for the review @TobiHartmann . Would you mind sponsoring this one and #376 ?

@TobiHartmann
Copy link
Member

TobiHartmann commented Apr 15, 2021

Sure!

/sponsor

@openjdk
Copy link

openjdk bot commented Apr 15, 2021

@TobiHartmann @nick-arm Since your change was applied there has been 1 commit pushed to the lworld branch:

  • 2e6c276: 8264414: [lworld] [AArch64] TestBufferTearing.java fails with C1

Your commit was automatically rebased without conflicts.

Pushed as commit 301de8d.

💡 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
2 participants