@@ -1754,6 +1754,7 @@ TR_J9EstimateCodeSize::realEstimateCodeSize(TR_CallTarget *calltarget, TR_CallSt
1754
1754
1755
1755
int32_t origAnalyzedSize = _analyzedSize;
1756
1756
int32_t origRealSize = _realSize;
1757
+ int32_t origBigCalleesSize = _bigCalleesSize;
1757
1758
bool prevNonColdCalls = _hasNonColdCalls;
1758
1759
bool estimateSuccess = estimateCodeSize (targetCallee, &callStack); // recurseDown = true
1759
1760
bool calltargetSetTooBig = false ;
@@ -1798,11 +1799,18 @@ TR_J9EstimateCodeSize::realEstimateCodeSize(TR_CallTarget *calltarget, TR_CallSt
1798
1799
}
1799
1800
}
1800
1801
1801
-
1802
- if (_analyzedSize - origAnalyzedSize > bigCalleeThreshold)
1802
+ #if defined(J9VM_OPT_OPENJDK_METHODHANDLE)
1803
+ int32_t bigCalleesSizeBelowMe = _bigCalleesSize - origBigCalleesSize;
1804
+ #else
1805
+ // Temporarily disable bigCalleeSize adjustment for OpenJ9 MethodHandle implementation as it exposes a functional issue
1806
+ // with the change in inlining behaviour resulting from this big callee adjustment.
1807
+ int32_t bigCalleesSizeBelowMe = 0 ;
1808
+ #endif /* J9VM_OPT_OPENJDK_METHODHANDLE */
1809
+ if ((_analyzedSize - origAnalyzedSize - bigCalleesSizeBelowMe) > bigCalleeThreshold)
1803
1810
{
1804
1811
// /printf("set warmcallgraphtoobig for method %s at index %d\n", calleeName, newBCInfo._byteCodeIndex);fflush(stdout);
1805
1812
calltarget->_calleeMethod ->setWarmCallGraphTooBig ( newBCInfo.getByteCodeIndex (), comp ());
1813
+ _bigCalleesSize = _bigCalleesSize + _analyzedSize - origAnalyzedSize - bigCalleesSizeBelowMe;
1806
1814
heuristicTrace (tracer (), " set warmcallgraphtoobig for method %s at index %d\n " , calleeName, newBCInfo.getByteCodeIndex ());
1807
1815
// _analyzedSize = origAnalyzedSize;
1808
1816
// _realSize = origRealSize;
0 commit comments