-
Notifications
You must be signed in to change notification settings - Fork 729
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 SVM AOT support for resolved invokeHandle/invokeDynamic dispatch #20373
Conversation
@hangshao0 does f9c7eba look like the proper way to conditionally support storing LambdaForms into the SCC? I wanted something like this so that we can add AOT MH tests without having to enable by default both LambdaForms in the SCC & Resolved |
Looks mostly fine. But you may want to set |
1e73b80
to
2e06461
Compare
@jdmpapin could you please review? @hangshao0 could you please review the VM changes? |
For now, is the new option I remember the reason of not storing lambdaForms class is that it has a performance issue. Storing lambdaForms requires the VM to do extra class comparisons before we can return the correct lamdaForm class. There is a PR #19763 that could address the performance issue. But it is not merged so the performance issue is still there. |
I'm treating this as an internal option for devs/testing. It can be deleted in the future when LambdaForms are stored into the SCC. Is there a better way to create/use an option for dev/testing purposes? |
The reason I was asking is because public option needs to be documented in the user guide, but since it it private option, we don't need documentation change. The way you are doing it here is fine. |
2e06461
to
512fe57
Compare
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.
@jdmpapin review reminder. |
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 for the most part. I have some very minor comments, some extremely minor, so feel free to decide where the line is
IMO the biggest naming problem is "callee." I didn't leave a regular comment for this because it's pervasive throughout these changes, but I think it's really misleading. Everything here is related to some call site, and w.r.t. to that call site, the method denoted by "callee" in this PR is always actually the caller
Huh, yeah I'm not sure why I wrote "callee", in my head it was definitely the caller method (since the callee is the thing we're validating). I know that the HandleMethod relo stuff was mostly a copy of the DynamicMethod relo stuff, so I guess the mistake I made just propagated everywhere. I'll make the fix since it is actually, more than just misleading, incorrect heh. |
512fe57
to
1560667
Compare
@jdmpapin made all the necessary changes. I also realized I was missing JITServer support, so I added that as well. I see that there's a conflict with the MINOR_NUMBER, but I'll fix that after you're done looking at the changes, since the force push will contain more than just my updates. |
1560667
to
f484da9
Compare
@jdmpapin updated the PR to fix the JITServer issue; it essentially involved refactoring the code that dereferenced Good for review again. |
f484da9
to
faf120d
Compare
@jdmpapin made the requested changes. |
Just need to fix the conflict now |
getTargetMethodFromMemberName is used for to get both a resolved dynamic method as well as a resolved handle method. It is a refactoring of code to enable resolved dispatch of invokeDynamic/invokeHandle in AOT in both local as well as remote compilation. Signed-off-by: Irwin D'Souza <[email protected]>
Add new TR_RelocationErrorCode kinds to indicate validation failures for TR_ValidateDynamicMethodFromCallsiteIndex and TR_ValidateHandleMethodFromCPIndex. Signed-off-by: Irwin D'Souza <[email protected]>
Signed-off-by: Irwin D'Souza <[email protected]>
Signed-off-by: Irwin D'Souza <[email protected]>
Signed-off-by: Irwin D'Souza <[email protected]>
Signed-off-by: Irwin D'Souza <[email protected]>
Signed-off-by: Irwin D'Souza <[email protected]>
faf120d
to
ba441fc
Compare
Jenkins test sanity.functional+aot all jdk17 depends eclipse-omr/omr#7494 |
zlinux failures due to
aix failure due to The linux failures are all of the form
which I can't find an existing issue for, so probably related to a change I made. |
My guess is it's the change
which is odd because this is an AOT test so you'd think |
Ah...
|
Signed-off-by: Irwin D'Souza <[email protected]>
ba441fc
to
9a7438f
Compare
Added NULL check (see force push). Jenkins test sanity.functional+aot xlinux,plinux,zlinux,alinux jdk17 depends eclipse-omr/omr#7494 |
alinux tests failed because of
Can't really determine why it was aborted. Pipeline_Build_Test shows
Pipeline_Test shows
|
Jenkins test sanity.functional+aot alinux jdk17 depends eclipse-omr/omr#7494 |
@jdmpapin all tests passed. Btw, the OMR PR that this PR depends on does not need a coordinated merge with this PR. |
OK, I've merged the OMR PR. Waiting for it to promote before merging this one |
-Xshareclasses:shareLambdaForm
is enabled.Depends on eclipse-omr/omr#7494
AOT MH is only enabled under
-Xaot:enableMHRelocatableCompile
. To enable resolved invokeHandle/invokeDynamic dispatch you also need to addshareLambdaForm
to the-Xshareclasses
option.