Skip to content

8341893: AArch64: Micro-optimize compressed ptr decoding #21443

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

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Oct 10, 2024

See the bug for full description. I think there is an accidental inefficiency in decoding: we don't have to shift when shift is zero, but we are tripped by d != s check. Other architectures seem to do this right. This fix surgically fixes the decoding. I have a variant of a more comprehensive MacroAssembler fix that could cover this shift-to-mov translation wholesale, but that fix is riskier.

Additional testing:

  • Linux AArch64 server fastdebug, tier{1,2,3}

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-8341893: AArch64: Micro-optimize compressed ptr decoding (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21443

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 10, 2024

👋 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

openjdk bot commented Oct 10, 2024

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

8341893: AArch64: Micro-optimize compressed ptr decoding

Reviewed-by: aph, fyang

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 71 new commits pushed to the master branch:

  • 037f11b: 8341708: Optimize safepoint poll encoding with smaller poll data offset
  • 8d0975a: 8336726: C2: assert(!do_asserts || projs->fallthrough_ioproj != nullptr) failed: must be found
  • fe98f86: 8226938: [TEST_BUG]GTK L&F: There is no Details button in FileChooser Dialog
  • 5c4f1ef: 8226933: [TEST_BUG]GTK L&F: There is no swatches or RGB tab in JColorChooser
  • 41ee582: 8341138: Rename jtreg property docker.support as container.support
  • 2e1c193: 8342003: ProblemList sun/security/tools/keytool/GenKeyPairSigner.java
  • 2db3397: 8341797: Fix ExceptionOccurred in jdk.jdi
  • c4965d9: 8341794: Fix ExceptionOccurred in jdk.attach
  • 3f53d57: 8340327: A common framework to support public key algorithms with standard parameter sets
  • 0a57fe1: 8341178: TypeRawPtr::add_offset may be "miscompiled" due to UB
  • ... and 61 more: https://git.openjdk.org/jdk/compare/580eb62dc097efeb51c76b095c1404106859b673...master

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

openjdk bot commented Oct 10, 2024

@shipilev 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 Oct 10, 2024
@shipilev shipilev marked this pull request as ready for review October 10, 2024 09:31
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 10, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 10, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 10, 2024
@shipilev
Copy link
Member Author

Thanks!

I think I need another Reviewer for this Hotspot patch.

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.

LGTM. Seems riscv bears a similar issue. Will check and propose a seperate fix.

RealFYang

This comment was marked as duplicate.

@shipilev
Copy link
Member Author

Thanks! Yes, I think RISC-V would enjoy a similar fix.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 14, 2024

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

  • 037f11b: 8341708: Optimize safepoint poll encoding with smaller poll data offset
  • 8d0975a: 8336726: C2: assert(!do_asserts || projs->fallthrough_ioproj != nullptr) failed: must be found
  • fe98f86: 8226938: [TEST_BUG]GTK L&F: There is no Details button in FileChooser Dialog
  • 5c4f1ef: 8226933: [TEST_BUG]GTK L&F: There is no swatches or RGB tab in JColorChooser
  • 41ee582: 8341138: Rename jtreg property docker.support as container.support
  • 2e1c193: 8342003: ProblemList sun/security/tools/keytool/GenKeyPairSigner.java
  • 2db3397: 8341797: Fix ExceptionOccurred in jdk.jdi
  • c4965d9: 8341794: Fix ExceptionOccurred in jdk.attach
  • 3f53d57: 8340327: A common framework to support public key algorithms with standard parameter sets
  • 0a57fe1: 8341178: TypeRawPtr::add_offset may be "miscompiled" due to UB
  • ... and 61 more: https://git.openjdk.org/jdk/compare/580eb62dc097efeb51c76b095c1404106859b673...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 14, 2024
@openjdk openjdk bot closed this Oct 14, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 14, 2024
@openjdk
Copy link

openjdk bot commented Oct 14, 2024

@shipilev Pushed as commit e3f6503.

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

@shipilev shipilev deleted the JDK-8341893-aarch64-micro-encoding branch January 8, 2025 11:35
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
Development

Successfully merging this pull request may close these issues.

3 participants