Repository navigation
Prevent pushing null appendix object for invokedynamic and invokehandle - #14769
Conversation
|
@nbhuiyan we had to revert the OMR PR, could you open it again? It'll have to be merged at the same time as this OpenJ9 PR. |
This change impacts how the stack is set up for resolved invokedynamic and invokehandle calls. An invokedynamic/invokehandle call is considered resolved when the call site table entry (invokedynamic) or MethodType table entry (invokehandle) corresponding to the bytecodes is resolved, allowing us to check if the entries - which we refer to as invoke cache array, contains a null appendix object. Normally, the appendix object is implicitly pushed as the last argument for resolved invokedynamic/invokehandle calls where we create a call for the target method as we can determine that at compile time. However, in some cases, the appendix object may be null, which happens when the target method does not expect it. Therefore, we need to check if that's the case and skip pushing the appendix object. Furthermore, the number of args that needs to be stashed for OSR would be determined by whether the appendix object was null. This does not affect unresolved invokedynamic/invokehandle, as those calls are handled via calling a VM INL method which checks if the appendix object is null before constructing the call frame for calling the target method. Signed-off-by: Nazim Bhuiyan <nubhuiyan@ibm.com>
|
@jdmpapin I have addressed the comments from your initial review |
|
Jenkins test sanity all jdk17 depends eclipse-omr/omr#6443 |
|
jdk17 testing succeeded. Also testing 8 and 11 because not all of the changes are within Jenkins test sanity all jdk8,jdk11 depends eclipse-omr/omr#6443 |
|
Jenkins test sanity plinuxjit,xlinuxjit,zlinuxjit jdk8,jdk11,jdk17 |
|
Jenkins test sanity plinuxjit,xlinuxjit,zlinuxjit jdk8,jdk11,jdk17 depends eclipse-omr/omr#6443 |
|
@nbhuiyan, please take a look at the JITServer build failures |
|
@jdmpapin can you try re-launching the x86-64 JITServer jobs? From the surface it seems like the OMR changes were not picked up in the x86-64 builds. |
|
Jenkins test sanity xlinuxjit jdk8,jdk11,jdk17 depends eclipse-omr/omr#6443 |
|
|
|
The tests have now passed. |
|
So they have! Maybe the failing builds were from my original Jenkins command where I forgot to specify the dependency, and they just hadn't been replaced by the second one yet Re-running the OMR acceptance-equivalent build because the previous builds are now 4-5 days old. Jenkins test sanity all jdk8,jdk11,jdk17 depends eclipse-omr/omr#6443 |
|
FYI there is a known build problem on Mac https://openj9.slack.com/archives/CDS7QE9HB/p1649429274506589 |
|
Jenkins test sanity xmac,amac jdk11,jdk17 depends eclipse-omr/omr#6443 |
Sorry, I didn't describe it very well. The code builds. The fix is happening in eclipse-omr/omr#6467 |
|
Re-running the OMR acceptance-equivalent build again now that eclipse-omr/omr#6467 is merged. Third time's a charm Jenkins test sanity all jdk8,jdk11,jdk17 depends eclipse-omr/omr#6443 |
|
The z Linux JDK 17 tests failed with an infrastructure problem:
Jenkins test sanity zlinux jdk17 depends eclipse-omr/omr#6443 |
|
The AArch64 Linux JDK17 build also failed with an infrastructure problem: Jenkins test sanity alinux jdk17 depends eclipse-omr/omr#6443 |
|
Jenkins test sanity aarch64_linux jdk17 depends eclipse-omr/omr#6443 |
1 similar comment
|
Jenkins test sanity aarch64_linux jdk17 depends eclipse-omr/omr#6443 |
|
Re-running these again in the hope that I can catch openj9-omr's openj9 and master branches in sync after they pass but before the build gets stale again... Jenkins test sanity all jdk8,jdk11,jdk17 depends eclipse-omr/omr#6443 |
|
Jenkins test sanity zlinux jdk17 depends eclipse-omr/omr#6443 |
|
Jenkins test sanity win jdk8 depends eclipse-omr/omr#6443 |
This change impacts how the stack is set up for resolved invokedynamic
and invokehandle calls. An invokedynamic/invokehandle call is considered
resolved when the call site table entry (invokedynamic) or MethodType
table entry (invokehandle) corresponding to the bytecodes is resolved,
allowing us to check if the entries - which we refer to as invoke
cache array, contains a null appendix object. Normally, the appendix
object is implicitly pushed as the last argument for resolved
invokedynamic/invokehandle calls where we create a call for the
adapter method as we can determine that at compile time. However, in
some cases, the appendix object may be null, which happens when the
adapter method does not expect it. Therefore, we need to check if
that's the case and skip pushing the appendix object.
Furthermore, the number of args that needs to be stashed for OSR
would be determined by whether the appendix object was null.
This does not affect unresolved invokedynamic/invokehandle, as those
calls are handled via calling a VM INL method which checks if the
appendix object is null before constructing the call frame for
calling the target method.
Depends: eclipse-omr/omr#6429Depends: eclipse-omr/omr#6443
Signed-off-by: Nazim Bhuiyan nubhuiyan@ibm.com