-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8352415: x86: Tighten up template interpreter method entry code #24114
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
8352415: x86: Tighten up template interpreter method entry code #24114
Conversation
|
Motivational improvements on 5950X, about 1.8% faster interpreted code. |
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
|
@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 96 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 |
adinn
left a comment
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.
Looks good to me.
Have you looked at aarch64 to see if this also a bottleneck there? It could use a similar trick to avoid calling load_mirror (which repeats the first two of three loads that intitialize rcpool).
Only briefly. AArch64 is clunkier, since it does things in pairs, but I think improvements there are possible as well. As usual, we do arch-specific optimizations in separate PRs, with one architecture being a pilot :) |
jdksjolen
left a comment
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.
LGTM
|
Thanks for reviews! @coleenp, you are likely interested in this area :) |
|
If there are no other comments, I am going to integrate this soon. Thanks! |
|
There we go! /integrate |
|
Going to push as commit 22f630c.
Your commit was automatically rebased without conflicts. |
coleenp
left a comment
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.
Sorry I was away and didn't see this. For the record, it looks good. I liked the load_mirror macro assembler function but it did redundant work.
Interpreter performance is the still important for faster startup, since it would carry application until compilers kick in. After looking at Leyden scenarios in Xint mode, I believe incremental improvements are possible in template interpreter to make it faster.
One of those improvements is tightening up method entry code. Profiling shows the hottest path in the whole ordeal for non-native methods is resolving the Java mirror to store the GC root for currently executing Method*. It involves 4-5 chained memory accesses, which incurs significant latency.
We can massage the code to reuse some memory accesses and also spread them out to allow more latency-hiding hardware mechanisms to kick in.
Additional testing:
-XintbenchmarksallProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24114/head:pull/24114$ git checkout pull/24114Update a local copy of the PR:
$ git checkout pull/24114$ git pull https://git.openjdk.org/jdk.git pull/24114/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24114View PR using the GUI difftool:
$ git pr show -t 24114Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24114.diff
Using Webrev
Link to Webrev Comment