Skip to content

Commit

Permalink
Disable GCR for hot compilations
Browse files Browse the repository at this point in the history
GCR (guarded counting recompilations is a mechanism that is supposed
to upgrade cold or AOT compilations to warm opt level. In theory
it should work with any opt level, but due to a bug it seems that
GCR is incompatible with hot compilations (see eclipse-openj9#4548 for details).
To allow stress testing with hot compilations this commit disables
GCR for hot compilations. This should have no bearing on behavior
in production because the natural way of upgrading hot compilations
to scorching is through sampling.

Fixes: eclipse-openj9#4445 eclipse-openj9#8064

Signed-off-by: Marius Pirvu <[email protected]>
  • Loading branch information
mpirvu committed May 7, 2020
1 parent 5f4a9c9 commit 4191168
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8332,9 +8332,10 @@ TR::CompilationInfoPerThreadBase::wrappedCompile(J9PortLibrary *portLib, void *
options->setOption(TR_UseSymbolValidationManager, false);
}

// See if we need to inset GCR trees
if (!details.supportsInvalidation())
{
// See if we need to insert GCR trees
if (!details.supportsInvalidation() ||
options->getOptLevel() >= hot) // Workaround for a bug with GCR inserted in hot bodies. See #4549 for details.
{ // Upgrades hot-->scorching should be done through sampling, not GCR
options->setOption(TR_DisableGuardedCountingRecompilations);
}
else if (vm->isAOT_DEPRECATED_DO_NOT_USE() || (options->getOptLevel() < warm &&
Expand Down

0 comments on commit 4191168

Please sign in to comment.