Skip to content

8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs #1606

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

cnqpzhang
Copy link
Contributor

@cnqpzhang cnqpzhang commented Apr 8, 2025

Backport the commit to set -XX:+UseSignumIntrinsic by default for Ampere CPUs. It is to fix performance problem observed on JMH cases vm.compiler.Signum|java.lang.MathBench.sig[nN]um. In the worst test cases, run speed is 1~2% of the expected (patched) and functions got severely impacted. So, the fix can be regarded not only a performance fix but also a function defect fixing in a manner, which can be a point to support this backport request too.

The commit is in jdk mainline and got successfully merged to jdk24u. It is of low risk as the patch is limited to Ampere CPUs only and well tested on Ampere-1A with related jmh and jtreg tier1 tests.


Progress

  • Change must not contain extraneous whitespace
  • JDK-8350483 needs maintainer approval
  • Commit message must refer to an issue

Issue

  • JDK-8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs (Enhancement - P4 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1606/head:pull/1606
$ git checkout pull/1606

Update a local copy of the PR:
$ git checkout pull/1606
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1606/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1606

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1606.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 8, 2025

👋 Welcome back qpzhang! 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 Apr 8, 2025

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

8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs

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

➡️ 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 changed the title Backport 23389d08a2b5c0840d2b18fb2e74d2d112b3192d 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs Apr 8, 2025
@openjdk
Copy link

openjdk bot commented Apr 8, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Apr 8, 2025

⚠️ @cnqpzhang This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 8, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 8, 2025

Webrevs

@cnqpzhang
Copy link
Contributor Author

/approval request the backport is straight-forward with the code changes safely confined to AArch64-port Ampere CPUs. These changes have been thoroughly verified on the Ampere-1A system, presenting a very low risk to the target jdk21u-dev branch. The fix is for not only for performance but also can be regarded as a function-wise patch. Because the worst-case performance comparison revealed a significant disparity between the patched and base versions, that the unpatched version taking 80~100x longer than normal cases, severely impacting the signum functions, so important to LTS versions. Thanks for approval.

@openjdk
Copy link

openjdk bot commented Apr 8, 2025

@cnqpzhang
8350483: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Apr 8, 2025
@cnqpzhang
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 8, 2025
@openjdk
Copy link

openjdk bot commented Apr 8, 2025

@cnqpzhang
Your change (at version 7ee518d) is now ready to be sponsored by a Committer.

@mlbridge
Copy link

mlbridge bot commented Apr 8, 2025

Mailing list message from Patrick Zhang OS on jdk-updates-dev:

Could any committer please help to sponsor this backport? It has been approved just now. Thanks.

Regards, Patrick

-----Original Message-----
From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.org> On Behalf Of Patrick Zhang
Sent: Tuesday, April 8, 2025 17:03
To: jdk-updates-dev at openjdk.org
Subject: [jdk21u-dev] RFR: 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs

Backport the commit to set -XX:+UseSignumIntrinsic by default for Ampere CPUs. It is to fix performance problem observed on JMH cases vm.compiler.Signum|java.lang.*MathBench.sig[nN]um*. In the worst test cases, run speed is 1~2% of the expected (patched) and functions got severely impacted. So, the fix can be regarded not only a performance fix but also a function **defect** fixing in a manner, which can be a point to support this backport request too.

The commit is in jdk mainline and got successfully merged to jdk24u. It is of low risk as the patch is limited to Ampere CPUs only and well tested on Ampere-1A with related jmh and jtreg tier1 tests.

-------------

Commit messages:
- Backport 23389d08a2b5c0840d2b18fb2e74d2d112b3192d

Changes: https://git.openjdk.org/jdk21u-dev/pull/1606/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1606&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8350483
Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/1606.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1606/head:pull/1606

PR: https://git.openjdk.org/jdk21u-dev/pull/1606

@theRealAph
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Apr 8, 2025

Going to push as commit 3c0c998.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 8, 2025
@openjdk openjdk bot closed this Apr 8, 2025
@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 Apr 8, 2025
@openjdk
Copy link

openjdk bot commented Apr 8, 2025

@theRealAph @cnqpzhang Pushed as commit 3c0c998.

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

@cnqpzhang cnqpzhang deleted the backport-cnqpzhang-23389d08-master branch April 9, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants