Skip to content

Commit 21d19c0

Browse files
authored
Merge pull request #21995 from jdmpapin/revert-21928-fej9-app-ext-loaders-0.53
(0.53) Revert "Make the extension and application loaders available via TR_J9VMBase"
2 parents 07ae170 + 4641ca0 commit 21d19c0

10 files changed

+3
-84
lines changed

runtime/compiler/control/JITClientCompilationThread.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,6 @@ handleServerMessage(JITServer::ClientStream *client, TR_J9VM *fe, JITServer::Mes
443443
ClientSessionData::VMInfo vmInfo = {};
444444
J9JavaVM * javaVM = vmThread->javaVM;
445445
vmInfo._systemClassLoader = fe->getSystemClassLoader();
446-
vmInfo._extensionClassLoader = fe->getExtensionClassLoader();
447-
vmInfo._applicationClassLoader = fe->getApplicationClassLoader();
448446
vmInfo._processID = fe->getProcessID();
449447
vmInfo._canMethodEnterEventBeHooked = fe->canMethodEnterEventBeHooked();
450448
vmInfo._canMethodExitEventBeHooked = fe->canMethodExitEventBeHooked();
@@ -3512,13 +3510,6 @@ remoteCompile(J9VMThread *vmThread, TR::Compilation *compiler, TR_ResolvedMethod
35123510
((TR::CompilationInfoPerThread *)compInfoPT)->clearDeserializerWasReset();
35133511
std::vector<uintptr_t> newKnownIds = deserializer ? deserializer->getNewKnownIds(compiler) : std::vector<uintptr_t>();
35143512

3515-
// The server might have cached the VMInfo for this client before the
3516-
// extension and/or application class loader existed. Send the class loader
3517-
// pointers with the compilation request so that in that case, if they have
3518-
// since been created, the server will have a chance to become aware of them.
3519-
void *extensionClassLoader = compiler->fej9vm()->getExtensionClassLoader();
3520-
void *applicationClassLoader = compiler->fej9vm()->getApplicationClassLoader();
3521-
35223513
// TODO: make this a synchronized region to avoid bad_alloc exceptions
35233514
compInfo->getSequencingMonitor()->enter();
35243515
// Collect the list of unloaded classes
@@ -3573,8 +3564,7 @@ remoteCompile(J9VMThread *vmThread, TR::Compilation *compiler, TR_ResolvedMethod
35733564
detailsStr, details.getType(), unloadedClasses, illegalModificationList, classInfoTuple, optionsStr,
35743565
recompMethodInfoStr, chtableUpdates.first, chtableUpdates.second, useAotCompilation,
35753566
TR::Compiler->vm.isVMInStartupPhase(compInfoPT->getJitConfig()), aotCacheStore, aotCacheLoad, methodIndex,
3576-
classChainOffset, ramClassChain, uncachedRAMClasses, uncachedClassInfos, newKnownIds,
3577-
extensionClassLoader, applicationClassLoader
3567+
classChainOffset, ramClassChain, uncachedRAMClasses, uncachedClassInfos, newKnownIds
35783568
);
35793569

35803570
JITServer::MessageType response;

runtime/compiler/control/JITServerCompilationThread.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,6 @@ TR::CompilationInfoPerThreadRemote::processCompilationRequest(CompilationRequest
588588
auto &uncachedRAMClasses = std::get<22>(req);
589589
auto &uncachedClassInfos = std::get<23>(req);
590590
auto &newKnownIds = std::get<24>(req);
591-
void *extensionClassLoader = std::get<25>(req);
592-
void *applicationClassLoader = std::get<26>(req);
593591

594592
TR_ASSERT_FATAL(TR::Compiler->persistentMemory() == compInfo->persistentMemory(),
595593
"per-client persistent memory must not be set at this point");
@@ -642,8 +640,6 @@ TR::CompilationInfoPerThreadRemote::processCompilationRequest(CompilationRequest
642640
throw std::bad_alloc();
643641

644642
setClientData(clientSession); // Cache the session data into CompilationInfoPerThreadRemote object
645-
clientSession->setExtensionClassLoader(extensionClassLoader);
646-
clientSession->setApplicationClassLoader(applicationClassLoader);
647643

648644
// After this line, all persistent allocations are made per-client,
649645
// until exitPerClientAllocationRegion is called

runtime/compiler/control/JITServerCompilationThread.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ using CompilationRequest = std::tuple<
4141
J9::IlGeneratorMethodDetailsType, std::vector<TR_OpaqueClassBlock *>, std::vector<TR_OpaqueClassBlock *>,
4242
JITServerHelpers::ClassInfoTuple, std::string, std::string, std::string, std::string,
4343
bool, bool, bool, bool, uint32_t, uintptr_t, std::vector<J9Class *>, std::vector<J9Class *>,
44-
std::vector<JITServerHelpers::ClassInfoTuple>, std::vector<uintptr_t>, void *, void *
44+
std::vector<JITServerHelpers::ClassInfoTuple>, std::vector<uintptr_t>
4545
>;
4646

4747
void outOfProcessCompilationEnd(TR_MethodToBeCompiled *entry, TR::Compilation *comp);

runtime/compiler/env/VMJ9.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7179,18 +7179,6 @@ TR_J9VMBase::getSystemClassLoader()
71797179
return vmThread()->javaVM->systemClassLoader;
71807180
}
71817181

7182-
void *
7183-
TR_J9VMBase::getExtensionClassLoader()
7184-
{
7185-
return vmThread()->javaVM->extensionClassLoader;
7186-
}
7187-
7188-
void *
7189-
TR_J9VMBase::getApplicationClassLoader()
7190-
{
7191-
return vmThread()->javaVM->applicationClassLoader;
7192-
}
7193-
71947182
bool
71957183
TR_J9VMBase::acquireClassTableMutex()
71967184
{

runtime/compiler/env/VMJ9.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,6 @@ class TR_J9VMBase : public TR_FrontEnd
14651465
virtual int32_t maxInternalPlusPinningArrayPointers(TR::Compilation* comp);
14661466

14671467
virtual void *getSystemClassLoader();
1468-
virtual void *getExtensionClassLoader();
1469-
virtual void *getApplicationClassLoader();
14701468

14711469
virtual TR_EstimateCodeSize *getCodeEstimator( TR::Compilation *comp);
14721470
virtual void releaseCodeEstimator( TR::Compilation *comp, TR_EstimateCodeSize *estimator);

runtime/compiler/env/VMJ9Server.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -407,22 +407,6 @@ TR_J9ServerVM::getSystemClassLoader()
407407
return vmInfo->_systemClassLoader;
408408
}
409409

410-
void *
411-
TR_J9ServerVM::getExtensionClassLoader()
412-
{
413-
JITServer::ServerStream *stream = _compInfoPT->getMethodBeingCompiled()->_stream;
414-
auto *vmInfo = _compInfoPT->getClientData()->getOrCacheVMInfo(stream);
415-
return vmInfo->_extensionClassLoader;
416-
}
417-
418-
void *
419-
TR_J9ServerVM::getApplicationClassLoader()
420-
{
421-
JITServer::ServerStream *stream = _compInfoPT->getMethodBeingCompiled()->_stream;
422-
auto *vmInfo = _compInfoPT->getClientData()->getOrCacheVMInfo(stream);
423-
return vmInfo->_applicationClassLoader;
424-
}
425-
426410
bool
427411
TR_J9ServerVM::jitFieldsOrStaticsAreIdentical(TR_ResolvedMethod * method1, I_32 cpIndex1, TR_ResolvedMethod * method2, I_32 cpIndex2, int32_t isStatic)
428412
{

runtime/compiler/env/VMJ9Server.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ class TR_J9ServerVM: public TR_J9VM
8282
virtual TR_OpaqueClassBlock * getLeafComponentClassFromArrayClass(TR_OpaqueClassBlock * arrayClass) override;
8383
virtual TR_OpaqueClassBlock *getClassFromSignature(const char *sig, int32_t length, J9ConstantPool *constantPool, bool isVettedForAOT = false) override;
8484
virtual void * getSystemClassLoader() override;
85-
virtual void * getExtensionClassLoader() override;
86-
virtual void * getApplicationClassLoader() override;
8785
virtual bool jitFieldsAreSame(TR_ResolvedMethod * method1, I_32 cpIndex1, TR_ResolvedMethod * method2, I_32 cpIndex2, int32_t isStatic) override;
8886
virtual bool jitStaticsAreSame(TR_ResolvedMethod *method1, I_32 cpIndex1, TR_ResolvedMethod *method2, I_32 cpIndex2) override;
8987
virtual TR_OpaqueClassBlock * getComponentClassFromArrayClass(TR_OpaqueClassBlock *arrayClass) override;

runtime/compiler/net/CommunicationStream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class CommunicationStream
129129
// likely to lose an increment when merging/rebasing/etc.
130130
//
131131
static const uint8_t MAJOR_NUMBER = 1;
132-
static const uint16_t MINOR_NUMBER = 81; // ID: FoxOMSLFyVA0Xn2XHmL1
132+
static const uint16_t MINOR_NUMBER = 80; // ID: snCDuoE2+InCmAiOg6YU
133133
static const uint8_t PATCH_NUMBER = 0;
134134
static uint32_t CONFIGURATION_FLAGS;
135135

runtime/compiler/runtime/JITClientSession.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,35 +2103,6 @@ ClientSessionData::printSharedProfileCacheStats() const
21032103
}
21042104
}
21052105

2106-
void
2107-
ClientSessionData::setExtensionClassLoader(void *loader)
2108-
{
2109-
if (_vmInfo != NULL)
2110-
{
2111-
setClassLoader(&_vmInfo->_extensionClassLoader, loader, "extension");
2112-
}
2113-
}
2114-
2115-
void
2116-
ClientSessionData::setApplicationClassLoader(void *loader)
2117-
{
2118-
if (_vmInfo != NULL)
2119-
{
2120-
setClassLoader(&_vmInfo->_applicationClassLoader, loader, "application");
2121-
}
2122-
}
2123-
2124-
void
2125-
ClientSessionData::setClassLoader(void **slot, void *loader, const char *which)
2126-
{
2127-
TR_ASSERT_FATAL(
2128-
*slot == NULL || *slot == loader,
2129-
"inconsistent %s loaders: %p vs %p",
2130-
*slot,
2131-
loader);
2132-
2133-
*slot = loader;
2134-
}
21352106

21362107
ClientSessionHT*
21372108
ClientSessionHT::allocate()

runtime/compiler/runtime/JITClientSession.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,6 @@ class ClientSessionData
278278
struct VMInfo
279279
{
280280
void *_systemClassLoader;
281-
void *_extensionClassLoader;
282-
void *_applicationClassLoader;
283281
uintptr_t _processID;
284282
bool _canMethodEnterEventBeHooked;
285283
bool _canMethodExitEventBeHooked;
@@ -553,11 +551,7 @@ class ClientSessionData
553551
void printSharedProfileCacheStats() const;
554552
void printIProfilerCacheStats();
555553

556-
void setExtensionClassLoader(void *loader);
557-
void setApplicationClassLoader(void *loader);
558-
559554
private:
560-
void setClassLoader(void **slot, void *loader, const char *which);
561555
void destroyMonitors();
562556

563557
// If this function sets the missingLoaderInfo flag then a NULL result is due to missing class loader info;

0 commit comments

Comments
 (0)