Skip to content

Enable peeking ILGen for methods with invokedynamic/invokehandle #22227

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

nbhuiyan
Copy link
Member

Enabling peeking ILGen for non-root methods that contain invokedynamic or invokehandle bytecodes. This will ensure that final field folding necessary for obtaining the target method is possible, and paves the way for more inlining opportunities along MethodHandle operations.

@@ -982,6 +982,8 @@ TR_J9EstimateCodeSize::processBytecodeAndGenerateCFG(TR_CallTarget *calltarget,
break;
case J9BCinvokedynamic:
case J9BCinvokehandle:
nph.setNeedsPeekingToTrue();
heuristicTrace(tracer(), "Depth %d: Enabled peeking ILGen for method %s due to invokedynamic/invokehandle bytecode at at bc index %d.", _recursionDepth, callerName, i);
Copy link
Contributor

@0xdaryl 0xdaryl Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the fall-thru deliberate here? Maybe add comment to that effect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is deliberate. I will add a comment to indicate that.

Enabling peeking ILGen for non-root methods that contain invokedynamic
or invokehandle bytecodes. This will ensure that final field folding
necessary for obtaining the target method is possible, and paves the
way for more inlining opportunities along MethodHandle operations.

Signed-off-by: Nazim Bhuiyan <[email protected]>
@vijaysun-omr
Copy link
Contributor

Simple enough, but also asking @jdmpapin for a review

@vijaysun-omr
Copy link
Contributor

Jenkins test sanity all

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 16, 2025

Jenkins test sanity.openjdk xlinux jdk21

I think we should test at least one platform against a wider set of tests.

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 16, 2025

Jenkins test sanity all jdk21

Re-starting Vijay's tests specifying a JDK level.

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 16, 2025

Z sanity OpenJDK failure appears to be #21619

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 17, 2025

Windows failure is in cmdLineTester_GCCheck_3 while analyzing the core file produced. This is unlikely to be caused by the change in this PR.

@0xdaryl 0xdaryl self-assigned this Jul 17, 2025
@vijaysun-omr vijaysun-omr merged commit 995f04d into eclipse-openj9:master Jul 17, 2025
24 of 27 checks passed
@pshipton
Copy link
Member

Windows failure is in cmdLineTester_GCCheck_3 while analyzing the core file produced. This is unlikely to be caused by the change in this PR.

Seems that it was. It's the same type of failure that is now occurring with frequency and set as a blocker.
#22256

@pshipton
Copy link
Member

pshipton commented Jul 21, 2025

I think if we can't fix the problem in the next day or two, we should revert this. Or first try some builds with this reverted to ensure it is the right change to revert.

nbhuiyan added a commit to nbhuiyan/openj9 that referenced this pull request Jul 21, 2025
…okehandle"

This reverts commit 995f04d, reversing
changes made to b867e08.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants