Skip to content

Commit

Permalink
Notify dependency table at method queue time
Browse files Browse the repository at this point in the history
Currently, methods with unsatisfied dependencies may still have loads
attempted for them. This can happen if their counts reach zero very
quickly. Since this is the case, methods that are about to be queued for
compilation no longer need to be tracked in the method dependency table.

Signed-off-by: Christian Despres <[email protected]>
  • Loading branch information
cjjdespres committed Nov 29, 2024
1 parent c0c4793 commit 9d4c253
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5059,6 +5059,11 @@ TR::CompilationInfo::addMethodToBeCompiled(TR::IlGeneratorMethodDetails & detail

Trc_JIT_CompRequest(vmThread, method, pc, !async, optimizationPlan->getOptLevel(), (int)priority, _numQueuedMethods);

// If method is going to be compiled, then the dependency table no longer needs to
// track it. Let the table know.
if (auto dependencyTable = getPersistentInfo()->getAOTDependencyTable())
dependencyTable->methodWillBeCompiled(method);

// Increase the queue weight
uint8_t entryWeight; // must be less than 256
if (!details.isOrdinaryMethod() || details.isNewInstanceThunk() || isJNINativeMethodRequest)
Expand Down Expand Up @@ -8254,11 +8259,6 @@ TR::CompilationInfoPerThreadBase::compile(J9VMThread * vmThread,
vmThread->omrVMThread->vmState = J9VMSTATE_JIT | J9VMSTATE_MINOR;
vmThread->jitMethodToBeCompiled = method;

// If method is being compiled, then the dependency table no longer needs to
// track it. Let the table know.
if (auto dependencyTable = getCompilationInfo()->getPersistentInfo()->getAOTDependencyTable())
dependencyTable->methodWillBeCompiled(method);

try
{
TR::RawAllocator rawAllocator(vmThread->javaVM);
Expand Down

0 comments on commit 9d4c253

Please sign in to comment.