-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8292713: Unsafe.allocateInstance should be intrinsified without UseUnalignedAccesses #9970
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
@RealFYang, you might want to give it a spin on your RISC-V machines ;) |
/label remove hotspot-runtime |
@shipilev |
@shipilev |
1-2 minutes (per test) on thead now, ( was 1-4 before the patch) |
I agree that this looks like mistake. Confirmation by another HotSpot member would be useful. |
@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:
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 38 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
Originally only 8 get/put*Unaligned
intrinsics were guarded by UseUnalignedAccesses
.
JDK-8130832 put accidentally additional 3 intrinsics: diff
get/putAddress_raw
intrinsics were removed later by JDK-8150921.
Thanks for finding this. And I have launched a Tier1 test with release build on my unmatched board. It should take hours to finish. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed tier1 hotspot & jdk test on riscv64-linux unmatched board. Looks good to me.
Thanks! Do you know if it passes significantly faster? |
Well, I was not timing the testing process since it was carried on unmatched board shared with other developers. |
No need, I was just curious. I'll integrate this then. /integrate |
Going to push as commit c062397.
Your commit was automatically rebased without conflicts. |
DO we want to backport it to jdk17u as well ? |
Yes, once it gets soaked in mainline for a week or two. |
See the rationale and references in the bug. I spotted that RISC-V tests are remarkably slow, and profiler shows that
Unsafe.allocateInstance
is very hot and native. RISC-V and ARM32 systems areUseUnalignedAccess = false
, and I believe the_allocateInstance
intrinsic is disabled on these paths by mistake. This PR improves the selected tests very considerably, and I think it actually fixes the real performance bug injava.lang.invoke
-rich code paths.Raspberry Pi 4, ARM32 fastdebug build:
HiFive Unmatched, RISC-V fastdebug build:
Additional testing:
tier1
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9970/head:pull/9970
$ git checkout pull/9970
Update a local copy of the PR:
$ git checkout pull/9970
$ git pull https://git.openjdk.org/jdk pull/9970/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9970
View PR using the GUI difftool:
$ git pr show -t 9970
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9970.diff