Skip to content

Commit

Permalink
Adding an env var for inliner max recursion depth
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysun-omr committed Jan 7, 2025
1 parent a32dd87 commit e0e22bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/compiler/optimizer/J9EstimateCodeSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,13 @@ TR_J9EstimateCodeSize::realEstimateCodeSize(TR_CallTarget *calltarget, TR_CallSt
return returnCleanup(ECS_VISITED_COUNT_THRESHOLD_EXCEEDED);
}

if (_recursionDepth > MAX_ECS_RECURSION_DEPTH)

int32_t maxRecDepth = MAX_ECS_RECURSION_DEPTH;
static const char *mrd = feGetEnv("TR_MaxRecursionDepth");
if (mrd)
maxRecDepth = atoi(mrd);

if (_recursionDepth > maxRecDepth)
{
calltarget->_isPartialInliningCandidate = false;
heuristicTrace(tracer(), "*** Depth %d: ECS end for target %p signature %s. Exceeded Recursion Depth", _recursionDepth, calltarget, callerName);
Expand Down

0 comments on commit e0e22bb

Please sign in to comment.