Skip to content

Commit

Permalink
Merge pull request #7372 from luke-li-2003/SetSCountWhenUsingUseHighe…
Browse files Browse the repository at this point in the history
…rMethodCounts

Option useHigherMethodCounts Now Correctly Sets the scount
  • Loading branch information
dsouzai committed Jun 27, 2024
2 parents b5ef5ed + a3143ad commit befee22
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2266,19 +2266,6 @@ OMR::Options::jitLatePostProcess(TR::OptionSet *optionSet, void * jitConfig)
_coldUpgradeSampleThreshold == TR_DEFAULT_COLD_UPGRADE_SAMPLE_THRESHOLD)
_coldUpgradeSampleThreshold = 10;
}

// disable DelayRelocationForAOTCompilations feature because with higher
// method counts, the JIT collects enough IProfiler info prior to
// compilation that it doesn't need to wait any longer before running the

if (self()->getOption(TR_UseHigherMethodCounts))
{
self()->setOption(TR_DisableDelayRelocationForAOTCompilations, true);// If scount has not been changed on the command line, adjust it here
if (self()->getInitialSCount() == TR_INITIAL_SCOUNT)
{
_initialSCount = _initialCount;
}
}
}
else // No AOT
{
Expand Down Expand Up @@ -2337,6 +2324,24 @@ OMR::Options::jitLatePostProcess(TR::OptionSet *optionSet, void * jitConfig)
if (self()->setCounts())
return false; // bad string count

// After the counts have been set, and if SCC is used, set scount = count
if (TR::Options::sharedClassCache())
{
if (self()->getOption(TR_UseHigherMethodCounts))
{
// disable DelayRelocationForAOTCompilations feature because with higher
// method counts, the JIT collects enough IProfiler info prior to
// compilation that it doesn't need to wait any longer before running
self()->setOption(TR_DisableDelayRelocationForAOTCompilations, true);

// If scount has not been changed on the command line, adjust it here
if (self()->getInitialSCount() == TR_INITIAL_SCOUNT)
{
_initialSCount = _initialCount;
}
}
}

// If Iprofiler is disabled we will not have block frequencies so we should
// disable the logic that makes inlining more conservative based on block frequencies
if (self()->getOption(TR_DisableInterpreterProfiling))
Expand Down

0 comments on commit befee22

Please sign in to comment.