Skip to content

Commit

Permalink
Only check doNotProfile flag under voluntaryOSR
Browse files Browse the repository at this point in the history
The flag only needs to be checked under voluntaryOSR. Yield
points in involuntaryOSR are always OSRPoints and there is always OSR
support for each yield points under this mode.

Signed-off-by: Yi Zhang <yizhang@ca.ibm.com>
  • Loading branch information
Yi Zhang committed Dec 18, 2018
1 parent 0d51469 commit 50e4d6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/il/symbol/OMRResolvedMethodSymbol.cpp
Expand Up @@ -1636,8 +1636,12 @@ OMR::ResolvedMethodSymbol::cannotAttemptOSRDuring(int32_t callSite, TR::Compilat
break;
}

// Check the caller existed during ILGen
if (callSiteInfo._byteCodeInfo.doNotProfile())
// In voluntaryOSR mode, check the caller existed during ILGen because
// there is no OSR support for call nodes created outside of ILGen.
//
// In involuntaryOSR node, yield points are always OSR points and there should be OSR
// support for very yield point under this mode.
if (callSiteInfo._byteCodeInfo.doNotProfile() && comp->getOSRMode() == TR::voluntaryOSR)
{
if (comp->getOption(TR_TraceOSR))
traceMsg(comp, "Cannot attempt OSR during caller bytecode index %d:%d as it did not exist at ilgen\n", callSite, byteCodeIndex);
Expand Down

0 comments on commit 50e4d6c

Please sign in to comment.