Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#18986 from mpirvu/bbfix
Browse files Browse the repository at this point in the history
Protect JITServer code with `#if defined(J9VM_OPT_JITSERVER)`
  • Loading branch information
keithc-ca authored Feb 21, 2024
2 parents 283a3b6 + ac9c181 commit da2c022
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7949,7 +7949,9 @@ TR::CompilationInfoPerThreadBase::preCompilationTasks(J9VMThread * vmThread,
_compInfo.acquireCompMonitor(vmThread);
bool checkpointInProgress = _compInfo.isCheckpointInProgress();
_compInfo.releaseCompMonitor(vmThread);
#if defined(J9VM_OPT_JITSERVER)
eligibleForRemoteAOTNoSCCCompile = eligibleForRemoteAOTNoSCCCompile && !checkpointInProgress;
#endif /* defined(J9VM_OPT_JITSERVER) */
#endif

bool sharedClassTest = eligibleForRelocatableCompile
Expand Down
6 changes: 5 additions & 1 deletion runtime/compiler/env/ClassLoaderTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ TR_PersistentClassLoaderTable::associateClassLoaderWithClass(J9VMThread *vmThrea
// If we are using the JITServer AOT cache and ignoring the local SCC, we need to remember the name of clazz
// with or without chain. Otherwise (not using AOT cache or not ignoring the local SCC) there is no point in continuing
// without a chain.
if (!chain && (!useAOTCache || !_persistentMemory->getPersistentInfo()->getJITServerAOTCacheIgnoreLocalSCC()))
if (!chain
#if defined(J9VM_OPT_JITSERVER)
&& (!useAOTCache || !_persistentMemory->getPersistentInfo()->getJITServerAOTCacheIgnoreLocalSCC())
#endif /* defined(J9VM_OPT_JITSERVER) */
)
return;
TR_ASSERT(!_sharedCache || !chain || _sharedCache->isPointerInSharedCache(chain), "Class chain must be in SCC");

Expand Down
2 changes: 2 additions & 0 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1995,8 +1995,10 @@ VMInitStages(J9JavaVM *vm, IDATA stage, void* reserved)
#if (defined(J9VM_ARCH_X86) || defined(J9VM_ARCH_S390) || defined(J9VM_ARCH_POWER) || defined(J9VM_ARCH_AARCH64))
IDATA argIndexXXPortableSharedCache = 0;
IDATA argIndexXXNoPortableSharedCache = 0;
#if defined(J9VM_OPT_JITSERVER)
IDATA argIndexXXJITServerAOTCache = 0;
IDATA argIndexXXNoJITServerAOTCache = 0;
#endif /* defined(J9VM_OPT_JITSERVER) */
#endif /* defined(J9VM_ARCH_X86) || defined(J9VM_ARCH_S390) || defined(J9VM_ARCH_POWER) || defined(J9VM_ARCH_AARCH64) */

vm->sharedClassPreinitConfig = NULL;
Expand Down

0 comments on commit da2c022

Please sign in to comment.