File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -2179,15 +2179,21 @@ void J9::Options::preProcessTLHPrefetch(J9JavaVM *vm)
2179
2179
#elif defined(TR_HOST_ARM64)
2180
2180
preferTLHPrefetch = true ;
2181
2181
#else // TR_HOST_X86
2182
- preferTLHPrefetch =
2183
- (TR::Compiler->target .cpu .isGenuineIntel () &&
2184
- TR::Compiler->target .cpu .isAtMost (OMR_PROCESSOR_X86_INTEL_BROADWELL)) ||
2185
- !TR::Compiler->target .cpu .isGenuineIntel ();
2182
+ preferTLHPrefetch = !TR::Compiler->target .cpu .isGenuineIntel () ||
2183
+ TR::Compiler->target .cpu .isAtMost (OMR_PROCESSOR_X86_INTEL_BROADWELL);
2186
2184
2187
2185
// Disable TM on x86 because we cannot tell whether a Haswell chip supports
2188
2186
// TM or not, plus it's killing the performance on dayTrader3
2189
2187
self ()->setOption (TR_DisableTM);
2190
2188
#endif
2189
+ // For portable AOT code we want to disable TLH prefetch
2190
+ if (preferTLHPrefetch &&
2191
+ J9_ARE_ANY_BITS_SET (vm->extendedRuntimeFlags2 , J9_EXTENDED_RUNTIME2_ENABLE_PORTABLE_SHARED_CACHE) &&
2192
+ self () == TR::Options::getAOTCmdLineOptions ()
2193
+ )
2194
+ {
2195
+ preferTLHPrefetch = false ;
2196
+ }
2191
2197
2192
2198
IDATA notlhPrefetch = FIND_ARG_IN_VMARGS (EXACT_MATCH, J9::Options::_externalOptionStrings[J9::ExternalOptions::XnotlhPrefetch], 0 );
2193
2199
IDATA tlhPrefetch = FIND_ARG_IN_VMARGS (EXACT_MATCH, J9::Options::_externalOptionStrings[J9::ExternalOptions::XtlhPrefetch], 0 );
Original file line number Diff line number Diff line change @@ -938,7 +938,7 @@ TR_RelocationRuntime::generateFeatureFlags(TR_FrontEnd *fe)
938
938
if (TR::Options::getCmdLineOptions ()->getOption (TR_DisableTraps))
939
939
featureFlags |= TR_FeatureFlag_DisableTraps;
940
940
941
- if (TR::Options::getCmdLineOptions ()->getOption (TR_TLHPrefetch))
941
+ if (TR::Options::getAOTCmdLineOptions ()->getOption (TR_TLHPrefetch))
942
942
featureFlags |= TR_FeatureFlag_TLHPrefetch;
943
943
944
944
if (TR::CodeCacheManager::instance ()->codeCacheConfig ().needsMethodTrampolines ())
You can’t perform that action at this time.
0 commit comments