diff --git a/runtime/compiler/arm/codegen/J9AheadOfTimeCompile.cpp b/runtime/compiler/arm/codegen/J9AheadOfTimeCompile.cpp index 41defbaed4c..0202410cd6f 100644 --- a/runtime/compiler/arm/codegen/J9AheadOfTimeCompile.cpp +++ b/runtime/compiler/arm/codegen/J9AheadOfTimeCompile.cpp @@ -237,7 +237,7 @@ J9::ARM::AheadOfTimeCompile::initializePlatformSpecificAOTRelocationHeader(TR::I acaRecord->setInlinedSiteIndex(reloTarget, inlinedSiteIndex); acaRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainIdentifyingLoaderOffsetInSharedCache, self(), classChainRecord); - acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord); + acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord, j9class); } break; diff --git a/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp b/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp index e43ab71a9e3..a032f902978 100644 --- a/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp +++ b/runtime/compiler/codegen/J9AheadOfTimeCompile.cpp @@ -672,7 +672,7 @@ J9::AheadOfTimeCompile::initializeCommonAOTRelocationHeader(TR::IteratedExternal pRecord->setRomClassOffsetInSharedCache(reloTarget, romClassOffsetInSharedCache, self(), inlinedCodeClass, classChainRecord); pRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainIdentifyingLoaderOffsetInSharedCache, self(), classChainRecord); - pRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord); + pRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord, inlinedCodeClass); pRecord->setMethodIndex(reloTarget, methodIndex); } break; @@ -698,7 +698,7 @@ J9::AheadOfTimeCompile::initializeCommonAOTRelocationHeader(TR::IteratedExternal mpRecord->setInlinedSiteIndex(reloTarget, inlinedSiteIndex); mpRecord->setClassChainForInlinedMethod(reloTarget, classChainForInlinedMethodOffsetInSharedCache, - self(), classChainRecord); + self(), classChainRecord, j9class); mpRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainOffsetOfCLInSharedCache, self(), classChainRecord); mpRecord->setVTableSlot(reloTarget, vTableOffset); @@ -739,7 +739,7 @@ J9::AheadOfTimeCompile::initializeCommonAOTRelocationHeader(TR::IteratedExternal cpRecord->setInlinedSiteIndex(reloTarget, inlinedSiteIndex); cpRecord->setClassChainForInlinedMethod(reloTarget, classChainForInlinedMethodOffsetInSharedCache, - self(), classChainRecord); + self(), classChainRecord, j9class); cpRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainOffsetOfCLInSharedCache, self(), classChainRecord); } @@ -1224,7 +1224,7 @@ J9::AheadOfTimeCompile::initializeCommonAOTRelocationHeader(TR::IteratedExternal acaRecord->setInlinedSiteIndex(reloTarget, inlinedSiteIndex); acaRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainIdentifyingLoaderOffsetInSharedCache, self(), classChainRecord); - acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord); + acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord, j9class); } break; diff --git a/runtime/compiler/p/codegen/J9AheadOfTimeCompile.cpp b/runtime/compiler/p/codegen/J9AheadOfTimeCompile.cpp index d23ba229b62..787fc0bcb69 100644 --- a/runtime/compiler/p/codegen/J9AheadOfTimeCompile.cpp +++ b/runtime/compiler/p/codegen/J9AheadOfTimeCompile.cpp @@ -251,7 +251,7 @@ J9::Power::AheadOfTimeCompile::initializePlatformSpecificAOTRelocationHeader(TR: acaRecord->setInlinedSiteIndex(reloTarget, inlinedSiteIndex); acaRecord->setClassChainIdentifyingLoaderOffsetInSharedCache(reloTarget, classChainIdentifyingLoaderOffsetInSharedCache, self(), classChainRecord); - acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord); + acaRecord->setClassChainForInlinedMethod(reloTarget, classChainOffsetInSharedCache, self(), classChainRecord, j9class); } break; diff --git a/runtime/compiler/runtime/RelocationRecord.cpp b/runtime/compiler/runtime/RelocationRecord.cpp index 2e25fdc9031..b4c601ccfbb 100644 --- a/runtime/compiler/runtime/RelocationRecord.cpp +++ b/runtime/compiler/runtime/RelocationRecord.cpp @@ -3261,11 +3261,13 @@ TR_RelocationRecordProfiledInlinedMethod::classChainIdentifyingLoaderOffsetInSha void TR_RelocationRecordProfiledInlinedMethod::setClassChainForInlinedMethod( TR_RelocationTarget *reloTarget, uintptr_t classChainForInlinedMethod, - TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord + TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord, + TR_OpaqueClassBlock *classForInlinedMethod ) { uintptr_t *addr = &((TR_RelocationRecordProfiledInlinedMethodBinaryTemplate *)_record)->_classChainForInlinedMethod; reloTarget->storeRelocationRecordValue(classChainForInlinedMethod, addr); + aotCompile->comp()->addAOTMethodDependency(classForInlinedMethod, classChainForInlinedMethod); #if defined(J9VM_OPT_JITSERVER) aotCompile->addClassChainSerializationRecord(classChainRecord, addr); #endif /* defined(J9VM_OPT_JITSERVER) */ @@ -5887,11 +5889,13 @@ TR_RelocationRecordPointer::classChainIdentifyingLoaderOffsetInSharedCache(TR_Re void TR_RelocationRecordPointer::setClassChainForInlinedMethod( TR_RelocationTarget *reloTarget, uintptr_t classChainForInlinedMethod, - TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord + TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord, + TR_OpaqueClassBlock *classForInlinedMethod ) { uintptr_t *addr = &((TR_RelocationRecordPointerBinaryTemplate *)_record)->_classChainForInlinedMethod; reloTarget->storeRelocationRecordValue(classChainForInlinedMethod, addr); + aotCompile->comp()->addAOTMethodDependency(classForInlinedMethod, classChainForInlinedMethod); #if defined(J9VM_OPT_JITSERVER) aotCompile->addClassChainSerializationRecord(classChainRecord, addr); #endif /* defined(J9VM_OPT_JITSERVER) */ diff --git a/runtime/compiler/runtime/RelocationRecord.hpp b/runtime/compiler/runtime/RelocationRecord.hpp index 154a6fda03c..03119520684 100644 --- a/runtime/compiler/runtime/RelocationRecord.hpp +++ b/runtime/compiler/runtime/RelocationRecord.hpp @@ -971,7 +971,8 @@ class TR_RelocationRecordProfiledInlinedMethod : public TR_RelocationRecordInlin uintptr_t classChainIdentifyingLoaderOffsetInSharedCache(TR_RelocationTarget *reloTarget); void setClassChainForInlinedMethod(TR_RelocationTarget *reloTarget, uintptr_t classChainForInlinedMethod, - TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord); + TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord, + TR_OpaqueClassBlock *classForInlinedMethod); uintptr_t classChainForInlinedMethod(TR_RelocationTarget *reloTarget); void setMethodIndex(TR_RelocationTarget *reloTarget, uintptr_t methodIndex); @@ -1806,7 +1807,8 @@ class TR_RelocationRecordPointer : public TR_RelocationRecordWithInlinedSiteInde uintptr_t classChainIdentifyingLoaderOffsetInSharedCache(TR_RelocationTarget *reloTarget); void setClassChainForInlinedMethod(TR_RelocationTarget *reloTarget, uintptr_t classChainOffsetInSharedCache, - TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord); + TR::AheadOfTimeCompile *aotCompile, const AOTCacheClassChainRecord *classChainRecord, + TR_OpaqueClassBlock *classForInlinedMethod); uintptr_t classChainForInlinedMethod(TR_RelocationTarget *reloTarget); virtual TR_RelocationRecordAction action(TR_RelocationRuntime *reloRuntime);