File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4226,6 +4226,20 @@ TR_CallSite *TR_InlinerBase::findAndUpdateCallSiteInGraph(TR_CallStack *callStac
42264226 if (findDirectCallSiteTarget (comp (), callsite, this )) {
42274227 // Can't do a partial inline anymore as the blocks are wrong.
42284228 callsite->getTarget (0 )->_isPartialInliningCandidate = false ;
4229+ // The new target bypasses the normal applyPolicyToTargets()
4230+ // path (since getSymbolAndFindInlineTargets() is called with
4231+ // findNewTargets=false below). Apply the
4232+ // TR_DontInlineUnloadableMethods check explicitly here to
4233+ // prevent attempts to create bonds during physical inlining.
4234+ // Note: the full applyPolicyToTargets() cannot be called here
4235+ // because it invokes exceedsSizeThreshold(), which accesses
4236+ // block information that is no longer valid at this point.
4237+ TR_CallTarget *newTarget = callsite->getTarget (0 );
4238+ if (comp ()->getOption (TR_DontInlineUnloadableMethods)
4239+ && !callsite->_retainedMethods ->willRemainLoaded (newTarget->_calleeMethod )) {
4240+ tracer ()->insertCounter (Unloadable_Callee, callsite->_callNodeTreeTop );
4241+ callsite->removecalltarget (0 , tracer (), Unloadable_Callee);
4242+ }
42294243 }
42304244 }
42314245 }
You can’t perform that action at this time.
0 commit comments