Skip to content

Commit

Permalink
Merge pull request #6012 from r30shah/enableOSRJProf
Browse files Browse the repository at this point in the history
Enable OSR for profiling compilations with JProfiling
  • Loading branch information
vijaysun-omr committed May 18, 2021
2 parents 1c6dead + 8caf6fe commit 05e6fec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ OMR::Compilation::Compilation(
self()->setOption(TR_EnableOSR); // OSR must be enabled for NextGenHCR
}

if (self()->isDLT() || (((self()->getMethodHotness() < warm) || self()->compileRelocatableCode() || self()->isProfilingCompilation()) && !enableOSRAtAllOptLevels && !_options->getOption(TR_FullSpeedDebug)))
if (self()->isDLT() || (((self()->getMethodHotness() < warm) || self()->compileRelocatableCode() || (self()->isProfilingCompilation() && self()->getProfilingMode() != JProfiling)) && !enableOSRAtAllOptLevels && !_options->getOption(TR_FullSpeedDebug)))
{
self()->setOption(TR_DisableOSR);
_options->setOption(TR_EnableOSR, false);
Expand Down Expand Up @@ -2505,7 +2505,7 @@ OMR::Compilation::getHCRMode()
{
if (!self()->getOption(TR_EnableHCR))
return TR::none;
if (self()->isDLT() || self()->isProfilingCompilation() || self()->getOptLevel() <= cold)
if (self()->isDLT() || (self()->isProfilingCompilation() && self()->getProfilingMode() != JProfiling) || self()->getOptLevel() <= cold)
return TR::traditional;
return self()->getOption(TR_EnableOSR) && !self()->getOption(TR_DisableNextGenHCR) ? TR::osr : TR::traditional;
}
Expand Down

0 comments on commit 05e6fec

Please sign in to comment.