-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8366461: Remove obsolete method handle invoke logic #27059
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
|
👋 Welcome back dlong! A progress list of the required criteria for merging this PR into |
|
@dean-long 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 116 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 |
|
@dean-long The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
/label hotspot-compiler hotspot-runtime |
|
@dean-long 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.
Nice cleanup! Looks good.
|
Thanks @iwanowww ! |
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.
Thank you for cleaning this up, @dean-long. I just have a drive-by comment.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java
Outdated
Show resolved
Hide resolved
|
I need one more review for this. |
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.
Thank you again for this extensive cleanup. I did another, more thorough, pass and have a few questions and suggestions.
src/hotspot/cpu/arm/frame_arm.cpp
Outdated
| nmethod* sender_nm = (_cb == nullptr) ? nullptr : _cb->as_nmethod_or_null(); | ||
| if (sender_nm != nullptr) { | ||
| // If the sender PC is a deoptimization point, get the original | ||
| // PC. For MethodHandle call site the unextended_sp is stored in | ||
| // saved_fp. | ||
| if (sender_nm->is_deopt_mh_entry(_pc)) { | ||
| DEBUG_ONLY(verify_deopt_mh_original_pc(sender_nm, _fp)); | ||
| _unextended_sp = _fp; | ||
| } | ||
| else if (sender_nm->is_deopt_entry(_pc)) { | ||
| // If the sender PC is a deoptimization point, get the original PC. | ||
| if (sender_nm->is_deopt_entry(_pc)) { | ||
| DEBUG_ONLY(verify_deopt_original_pc(sender_nm, _unextended_sp)); | ||
| } | ||
| else if (sender_nm->is_method_handle_return(_pc)) { | ||
| _unextended_sp = _fp; | ||
| } | ||
| } |
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.
All of this could be NOT_PRODUCT and the method const if I did not miss any side effects.
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.
Right, there is no adjustment anymore on any platform. I think this function and verify_deopt_original_pc only ever existed to support code that is now getting removed. So I could change the name to verify_unextended_sp() and make it const, but it might make more sense to remove both this function and verify_deopt_original_pc now. What do you think?
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.
I would rather keep this code as a debug only sanity check, but I would refactor it into a single function. Then the question remains what to do with the SA code, that still does nothing.
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.
I would rather keep this code as a debug only sanity check, but I would refactor it into a single function. Then the question remains what to do with the SA code, that still does nothing.
I think we can do even better and get rid of adjust_unextended_sp, moving the debug check into get_deopt_original_pc. This moves the SA changes into shared code, and fixes the anomaly that s390 never called adjust_unextended_sp and thus never called the debug code to do the sanity check.
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.
That is indeed even better. Nice.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java
Show resolved
Hide resolved
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.
I have one last nit below. Otherwise, this looks good to me.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Frame.java
Outdated
Show resolved
Hide resolved
src/hotspot/cpu/arm/frame_arm.cpp
Outdated
| nmethod* sender_nm = (_cb == nullptr) ? nullptr : _cb->as_nmethod_or_null(); | ||
| if (sender_nm != nullptr) { | ||
| // If the sender PC is a deoptimization point, get the original | ||
| // PC. For MethodHandle call site the unextended_sp is stored in | ||
| // saved_fp. | ||
| if (sender_nm->is_deopt_mh_entry(_pc)) { | ||
| DEBUG_ONLY(verify_deopt_mh_original_pc(sender_nm, _fp)); | ||
| _unextended_sp = _fp; | ||
| } | ||
| else if (sender_nm->is_deopt_entry(_pc)) { | ||
| // If the sender PC is a deoptimization point, get the original PC. | ||
| if (sender_nm->is_deopt_entry(_pc)) { | ||
| DEBUG_ONLY(verify_deopt_original_pc(sender_nm, _unextended_sp)); | ||
| } | ||
| else if (sender_nm->is_method_handle_return(_pc)) { | ||
| _unextended_sp = _fp; | ||
| } | ||
| } |
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.
That is indeed even better. Nice.
…ame.java Co-authored-by: Manuel Hässig <manuel@haessig.org>
|
Thanks @mhaessig for the review. |
|
/integrate |
|
@dean-long This pull request has not yet been marked as ready for integration. |
|
@iwanowww , I think I need you to re-review the final version. |
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.
Still looks good.
|
Thanks Vladimir for the re-review. |
|
/integrate |
|
Going to push as commit da7121a.
Your commit was automatically rebased without conflicts. |
|
@dean-long Pushed as commit da7121a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
At one time, JSR292 support needed special logic to save and restore SP across method handle instrinsic calls, but that is no longer the case. The only platform that still does the save/restore is arm32, which is no longer necessary. The save/restore can be removed along with related APIs and logic. Note that the arm32 port is largely based on the x86 port, which stopped doing the save/restore in jdk9 (JDK-8068945).
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27059/head:pull/27059$ git checkout pull/27059Update a local copy of the PR:
$ git checkout pull/27059$ git pull https://git.openjdk.org/jdk.git pull/27059/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27059View PR using the GUI difftool:
$ git pr show -t 27059Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27059.diff
Using Webrev
Link to Webrev Comment