-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8301997: Move method resolution information out of the cpCache #15455
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 matsaave! A progress list of the required criteria for merging this PR into |
|
@matias9927 The following label 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 list. If you would like to change these labels, use the /label pull request command. |
|
@matias9927 this pull request can not be integrated into git checkout method_entry_8301997
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
|
007b0e6 to
9f73d7e
Compare
Webrevs
|
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.
I'm about halfway through.
|
|
||
| void load_resolved_indy_entry(Register cache, Register index); | ||
| void load_field_entry(Register cache, Register index, int bcp_offset = 1); | ||
| void load_method_entry(Register cache, Register index, int bcp_offset = 1); |
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.
As a future RFE, maybe we could put some of these common functions in src/share/interpreter/interp_masm.hpp. I think you need to remove the declarations for the 4 functions you removed from this and the aarch64 version.
Hi Martin, Yes, I see that assertion for PPC. But my question is about aarch64 where |
Sorry, I was not clear enough. I wanted to suggest adding the assertion to other platforms and changing the register if needed. |
|
AFAICS, |
Thank you for taking a look. I also checked the aarch64 and x86 code and now I see the difference. |
|
@matias9927 Hi, I have prepared a similar improvement for riscv64. The volatile registers are also preserved on this platform. |
|
Hi @matias9927, Please add s390-Port from here: offamitkumar@3f70174 |
Thank you for the port Amit! /contributor add @offamitkumar |
|
@matias9927 |
|
I believe this PR has reached a stage where it can be safely committed. Thank you to all the reviewers for your excellent feedback and thank you to all porters for your contributions! |
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.
Does it need another approval. If so, here it is.
|
Going to push as commit ffa35d8.
Your commit was automatically rebased without conflicts. |
|
@matias9927 Pushed as commit ffa35d8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
@matias9927 this broke arm (32-bit) build: I don't see GHA testing is setup for your repo. |
This patch includes changes to the interpreters which were provided by porters. Oracle is responsible for x86-64 and aarch64 so completed those and made an effort to inform porters of the upcoming change. The ARM32 port has not yet been completed and thus is not part of this patch. The ARM32 ports have previously been handled by @bulasevich and @voitylov and they have been contacted. |
|
Noted, we'll follow up with the arm32 fix a little later. Thanks Matias! |
Thanks for the confirmation @voitylov, I look forward to the port! |
|
@matias9927 Having the arm build broken is really bad. It's one thing if the VM is dead on arrival, but this shows up in everyone's GHA as a red flag. It teaches people to ignore GHAs. We require clean GHAs from outside developers; I think this sets a bad precedence. |
|
Adoptium also unable to build jdk-22 ARM32, I have raised a bug: https://bugs.openjdk.org/browse/JDK-8320402 |
| break; | ||
| } | ||
| // Load-acquire the bytecode to match store-release in InterpreterRuntime | ||
| __ membar(MacroAssembler::AnyAny); |
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.
Perhaps just using StoreLoad here is enough, right?
The current structure used to store the resolution information for methods, ConstantPoolCacheEntry, is difficult to interpret due to its ambigious fields f1 and f2. This structure previously held information for fields, methods, and invokedynamic calls which were all encoded into f1 and f2. Currently this structure only handles method entries, but it remains obtuse and inconsistent with recent changes.
This enhancement introduces a new data structure that stores the necessary resolution data in an intuitive an extensible manner. These resolved entries are stored in an array inside the constant pool cache in a very similar manner to invokedynamic entries in JDK-8301995.
Instances of ConstantPoolCache entry related to field resolution have been replaced with the new ResolvedMethodEntry, and ConstantPoolCacheEntry has been removed entirely. The class ResolvedMethodEntry holds resolution information for all types of invoke calls besides invokedynamic, and thus has fields that may be unused depending on the invoke code.
To streamline the review, please consider these major areas that have been changed:
Verified with tier 1-9 tests.
This change supports the following platforms: x86, aarch64, RISCV, PPC, S390
Progress
Issue
Reviewers
Contributors
<gcao@openjdk.org><fyang@openjdk.org><mdoerr@openjdk.org><amitkumar@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15455/head:pull/15455$ git checkout pull/15455Update a local copy of the PR:
$ git checkout pull/15455$ git pull https://git.openjdk.org/jdk.git pull/15455/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15455View PR using the GUI difftool:
$ git pr show -t 15455Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15455.diff
Webrev
Link to Webrev Comment