Skip to content

Commit afaad94

Browse files
committed
Do not check iTable entries after lastITable cache test at warm
PR #22216 introduced a change in the code generator for x86 to check a few entries from the iTable if the lastITable cache test fails. While this change improves the score of some benchmarks (like pmd from DaCapo) it may regress others (Daytrader8 1%, AcmeAirEE8 0.8%, Liberty startup 2%). This commit allows the iTable entries check only for compilations at `hot` or above opt levels. To allow the iTable entries check at opt levels lower than `hot` the user needs to use the following Xjit/Xaot command line option: `enableITableIterationsAfterLastITableCacheCheckAtWarm` To disable the iTable entries check at all opt levels, the user needs to use the following Xjit/Xaot option: `disableITableIterationsAfterLastITableCacheCheck` Depends on: eclipse-omr/omr#8009 Signed-off-by: Marius Pirvu <[email protected]>
1 parent a928962 commit afaad94

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

runtime/compiler/x/codegen/X86PrivateLinkage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,8 @@ void J9::X86::PrivateLinkage::buildInterfaceDispatchUsingLastITable (TR::X86Call
29202920
interfaceClassReg, cg());
29212921
}
29222922

2923-
if (comp()->getOption(TR_DisableITableIterationsAfterLastITableCacheCheck))
2923+
if (comp()->getOption(TR_DisableITableIterationsAfterLastITableCacheCheck) ||
2924+
(comp()->getOptLevel() <= warm && !comp()->getOption(TR_EnableITableIterationsAfterLastITableCacheCheckAtWarm)))
29242925
{
29252926
generateLongLabelInstruction(TR::InstOpCode::JNE4, callNode, lookupDispatchSnippetLabel, cg()); // PICBuilder needs this to have a 4-byte offset
29262927
if (comp()->target().is32Bit())

runtime/compiler/z/codegen/S390PrivateLinkage.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,9 +1538,8 @@ getITableIterationsNumber(TR::Compilation * comp, TR::SymbolReference * methodSy
15381538

15391539
TR_J9VMBase *fej9 = (TR_J9VMBase *)(comp->fe());
15401540
bool trace = comp->getOption(TR_TraceCG);
1541-
static bool disableITableIterationsAfterLastITableCacheCheck = feGetEnv("TR_DisableITableIterationsAfterLastITableCacheCheck") != NULL;
15421541

1543-
if (disableITableIterationsAfterLastITableCacheCheck)
1542+
if (comp->getOption(TR_DisableITableIterationsAfterLastITableCacheCheck))
15441543
{
15451544
if (trace)
15461545
traceMsg(comp, "ITable iteration after lastITable check is disabled.\n");

0 commit comments

Comments
 (0)