Skip to content

Commit

Permalink
Merge pull request #6255 from nbhuiyan/osr-fix
Browse files Browse the repository at this point in the history
Prevent OSR transitions from failed guards
  • Loading branch information
0xdaryl committed Nov 25, 2021
2 parents 736e25f + 8a06709 commit e1762a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/optimizer/Inliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,13 @@ TR_InlinerBase::addGuardForVirtual(
else if (!disableHCRGuards && comp()->getHCRMode() != TR::none)
createdHCRGuard = true;

#if defined(J9VM_OPT_OPENJDK_METHODHANDLE)
// for inlined callee methods that do not have HCR guards, setting createdHCRGuard to false
// prevents creating an OSR transition point to be taken in cases such as a failed TR_ProfiledGuard
if (skipHCRGuardForCallee)
createdHCRGuard = false;
#endif

static const char *disableFSDGuard = feGetEnv("TR_DisableFSDGuard");
if ( !disableFSDGuard && comp()->getOption(TR_FullSpeedDebug) && guard->_kind != TR_BreakpointGuard)
{
Expand Down

0 comments on commit e1762a2

Please sign in to comment.