-
Enhancement
-
Resolution: Unresolved
-
P4
-
9, 10
John Rose wrote:
If a call site causes too many bailouts, we go to a slow non-inlined code shape, as noted by this bug.
There are ways to make those call sites patchable (data driven) but keep more of the optimizations associated with inlining. Something like bimorphic call sites, where one CS target is favored by inlining, but other targets are supported by out-of-line calls.
if (cs.target == expected_target) expected_target.invoke(); // possibly inlined
else cs.target.invoke(); // probably slow, indirect out-of-line
Also, we could make these call sites patchable as with today's CompiledIC guys:
L_Patchable: nop_patchable_to_jump();
L_Fast: expected_target.invoke(); L_Done:
...
L_Patched: {lazily generated code for alternative to L_Fast}; goto L_Done
If a call site causes too many bailouts, we go to a slow non-inlined code shape, as noted by this bug.
There are ways to make those call sites patchable (data driven) but keep more of the optimizations associated with inlining. Something like bimorphic call sites, where one CS target is favored by inlining, but other targets are supported by out-of-line calls.
if (cs.target == expected_target) expected_target.invoke(); // possibly inlined
else cs.target.invoke(); // probably slow, indirect out-of-line
Also, we could make these call sites patchable as with today's CompiledIC guys:
L_Patchable: nop_patchable_to_jump();
L_Fast: expected_target.invoke(); L_Done:
...
L_Patched: {lazily generated code for alternative to L_Fast}; goto L_Done
- relates to
-
JDK-7177745 JSR292: Many Callsite relinkages cause target method to always run in interpreter mode
-
- Resolved
-