Skip to content

Commit

Permalink
Merge pull request #18063 from a7ehuo/pr-fix-creationClassUnload-aotLoad
Browse files Browse the repository at this point in the history
Do not create class unload PIC site assumption if not required
  • Loading branch information
mpirvu authored Sep 5, 2023
2 parents e57170e + e16b1ff commit bbe274b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/compiler/runtime/RelocationRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5462,16 +5462,18 @@ TR_RelocationRecordSymbolFromManager::activatePointer(TR_RelocationRuntime *relo
clazz = (TR_OpaqueClassBlock *)J9_CLASS_FROM_METHOD((J9Method *)(reloPrivateData->_symbol));
}

if (needsUnloadAssumptions(symbolType))
TR::Compilation *comp = reloRuntime->comp();
if (needsUnloadAssumptions(symbolType) &&
comp->fej9()->isUnloadAssumptionRequired(clazz, comp->getCurrentMethod()))
{
SVM_ASSERT(clazz != NULL, "clazz must exist to add Unload Assumptions!");
reloTarget->addPICtoPatchPtrOnClassUnload(clazz, reloLocation);
}
if (needsRedefinitionAssumption(reloRuntime, reloLocation, clazz, symbolType))
{
SVM_ASSERT(clazz != NULL, "clazz must exist to add Redefinition Assumptions!");
createClassRedefinitionPicSite((void *)reloPrivateData->_symbol, (void *) reloLocation, sizeof(uintptr_t), false, reloRuntime->comp()->getMetadataAssumptionList());
reloRuntime->comp()->setHasClassRedefinitionAssumptions();
createClassRedefinitionPicSite((void *)reloPrivateData->_symbol, (void *) reloLocation, sizeof(uintptr_t), false, comp->getMetadataAssumptionList());
comp->setHasClassRedefinitionAssumptions();
}
}

Expand Down

0 comments on commit bbe274b

Please sign in to comment.