From 77067cc65a09ac8e0a2584f8bf51f4fc10852216 Mon Sep 17 00:00:00 2001 From: Luke Li Date: Tue, 31 Dec 2024 14:34:07 -0500 Subject: [PATCH] Consider the compileMethod() API in replenishInvocationCount() Assertion Add a flag in the optimization plan for compilations triggered by the compileMethod API, which can have the invocation count be any positive integer; replenishInvocationCount will not raise the assertion failure for unexpected count value. Based on https://github.com/eclipse-openj9/openj9/issues/15472 Signed-off-by: Luke Li --- runtime/compiler/control/CompilationThread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/compiler/control/CompilationThread.cpp b/runtime/compiler/control/CompilationThread.cpp index 725fd80f045..8802f1dc7cc 100644 --- a/runtime/compiler/control/CompilationThread.cpp +++ b/runtime/compiler/control/CompilationThread.cpp @@ -11955,7 +11955,9 @@ TR::CompilationInfo::replenishInvocationCount(J9Method *method, TR::Compilation } else { - TR_ASSERT(false, "Unexpected value for method->extra = %p (method=%p)\n", TR::CompilationInfo::getJ9MethodExtra(method), method); + TR_ASSERT(comp->getOptimizationPlan()->isExplicitCompilation(), + "Unexpected value for method->extra = %p (method=%p)\n", + TR::CompilationInfo::getJ9MethodExtra(method), method); } }