From 01824c40c9b823090fed9b5eedb47d98811b4377 Mon Sep 17 00:00:00 2001 From: Luke Li Date: Tue, 31 Dec 2024 14:34:07 -0500 Subject: [PATCH] Check for Explicit Compilation in the replenishInvocationCount() Assertion replenishInvocationCount will only raise the assertion failure for unexpected count value if the compilation was not set as explicit, since the count value can be any positive integer in that case. 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); } }