Skip to content

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

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

Conversation

cnqpzhang
Copy link
Contributor

@cnqpzhang cnqpzhang commented Mar 4, 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 problem solving in a manner, which can be a point to support this backport request too.

The backporting is of low risk as the patch is limited to Ampere CPUs only and well verified 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/jdk24u.git pull/101/head:pull/101
$ git checkout pull/101

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 101

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk24u/pull/101.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 4, 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 Mar 4, 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 5 new commits pushed to the master branch:

  • 1603de1: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay
  • 33960cf: 8344581: [TESTBUG] java/awt/Robot/ScreenCaptureRobotTest.java failing on macOS
  • 6109c0b: 8351033: RISC-V: TestFloat16ScalarOperations asserts with offset (4210) is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!
  • d8d055e: 8350820: OperatingSystemMXBean CpuLoad() methods return -1.0 on Windows
  • 91ce41f: 8276995: Bug in jdk.jfr.event.gc.collection.TestSystemGC

Please see this link for an up-to-date comparison between the source branch of this pull request and 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.

➡️ 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 f529bf712d8946584999dfc98abea60c22c97167 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs Mar 4, 2025
@openjdk
Copy link

openjdk bot commented Mar 4, 2025

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

@openjdk
Copy link

openjdk bot commented Mar 4, 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 Mar 4, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 4, 2025

Webrevs

@cnqpzhang
Copy link
Contributor Author

/approval request The backport is simple and straight-forward, the change itself is safely limited to AArch64-port Ampere CPUs only, and well verified on Ampere-1A system, can be safe for backport. The fix is for not only for performance but also can be regarded a function-wise patch since the worst performance gap (patched vs base) is super huge. Please approve, thanks.

@openjdk
Copy link

openjdk bot commented Mar 4, 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 Mar 4, 2025
@cnqpzhang
Copy link
Contributor Author

/integrate

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

openjdk bot commented Mar 7, 2025

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

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 7, 2025

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

  • 1603de1: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay
  • 33960cf: 8344581: [TESTBUG] java/awt/Robot/ScreenCaptureRobotTest.java failing on macOS
  • 6109c0b: 8351033: RISC-V: TestFloat16ScalarOperations asserts with offset (4210) is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!
  • d8d055e: 8350820: OperatingSystemMXBean CpuLoad() methods return -1.0 on Windows
  • 91ce41f: 8276995: Bug in jdk.jfr.event.gc.collection.TestSystemGC

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 7, 2025

@phohensee @cnqpzhang Pushed as commit 23389d0.

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

@cnqpzhang
Copy link
Contributor Author

/backport jdk21u-dev

@cnqpzhang cnqpzhang deleted the backport-cnqpzhang-f529bf71-master branch April 8, 2025 08:17
@openjdk
Copy link

openjdk bot commented Apr 8, 2025

@cnqpzhang Could not automatically backport 23389d08 to openjdk/jdk21u-dev due to conflicts in the following files:

  • src/hotspot/cpu/aarch64/vm_version_aarch64.cpp

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk21u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk21u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-cnqpzhang-23389d08-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk24u.git 23389d08a2b5c0840d2b18fb2e74d2d112b3192d

# Backport the commit
$ git cherry-pick --no-commit 23389d08a2b5c0840d2b18fb2e74d2d112b3192d
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 23389d08a2b5c0840d2b18fb2e74d2d112b3192d'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk21u-dev with the title Backport 23389d08a2b5c0840d2b18fb2e74d2d112b3192d.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 23389d08 from the openjdk/jdk24u repository.

The commit being backported was authored by Patrick Zhang on 7 Mar 2025 and had no reviewers.

Thanks!

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