-
Notifications
You must be signed in to change notification settings - Fork 767
Add var handle method type lookup table walking #18976
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
Add var handle method type lookup table walking #18976
Conversation
3983eca
to
ec93ddb
Compare
@babsingh Could you please review this PR or delegate? Thanks |
jenkins test sanity plinuxjit,xlinuxjit,zlinuxjit,alinux64jit jdk11 |
jenkins test sanity.openjdk,extended.openjdk xlinuxjit,plinuxjit,zlinuxjit jdk11 |
The assert reported in #18957 is no longer seen with this fix |
Your changes are correct. |
Commit message should be strengthened by adding why these changes are needed and what is fixed. Currently, the commit message only has a title. |
The var handle method type lookup table is now walked in allSlotsInROMClassDo(). This section of a J9ROMClass, written by ROMClassWriter::writeVarHandleMethodTypeLookupTable() if J9VM_OPT_METHOD_HANDLE is active, was previously not visited by the ROM class walker. In addition to being necessary in general to walk this section for the sake of completeness, walking this ROM class section is necessary in particular so that JITServerHelpers::packROMClass() can have access to all ROM class sections and their sizes. Not walking every section of the ROM class led to a fatal assert being triggered in packROMClass in the related issue. Fixes: eclipse-openj9#18957 Signed-off-by: Christian Despres <[email protected]>
ec93ddb
to
703bea7
Compare
Force-pushed to address comments. |
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. Old PR builds should still be good since the recent changes don't impact functionality. A JIT server file is also modified; I will defer the merge to a JIT member.
Old PR builds:
The JITServer file only contains comments. This PR should be good to merge. |
@hangshao0 Should the shared class cache version have been updated with this change? Should |
Is the layout of the rom class changed ? If yes, the shared cache version should be updated. |
The ROM class layout is unchanged. Only the ROM class walker in |
Ok, it would seem to be missing in DDR as well. Is someone working to correct that? |
Not that I know of. I wasn't aware of |
I will take a look into it. It is associated to OpenJ9 MethodHandles, which we are trying to replace with OpenJDK MethodHandles in JDK8/JDK11. Since we plan to disable OJ9 MHs, this will take low priority. |
Even after we stop using OpenJ9 method handles, the DDR part will be useful for examining core files produced by VMs that predate the adoption of openjdk method handles. |
Related: eclipse-openj9#18976 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#18976 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#18976 Signed-off-by: Babneet Singh <[email protected]>
The content of the
varHandleMethodTypeLookupTable
is now walked inallSlotsInROMClassDo
.The relevant section of the ROM class writer code is here, I believe:
openj9/runtime/bcutil/ROMClassWriter.cpp
Lines 887 to 910 in 6a6d7af
I think the individual slots are
"cpIndex"
, but I'm unsure. I also made up the new section name"varHandleMethodTypeLookupTable"
.I also updated some of the documentation surrounding
JITServerHelpers::packROMClass
.Fixes: #18957