diff options
-rw-r--r-- | test/common/runtime_state.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/common/runtime_state.cc b/test/common/runtime_state.cc index 9ed573f0f7..a385f4c8db 100644 --- a/test/common/runtime_state.cc +++ b/test/common/runtime_state.cc @@ -273,7 +273,10 @@ static void ForceJitCompiled(Thread* self, // Update the code cache to make sure the JIT code does not get deleted. // Note: this will apply to all JIT compilations. code_cache->SetGarbageCollectCode(false); - if (kind == CompilationKind::kBaseline || jit->GetJitCompiler()->IsBaselineCompiler()) { + if (jit->JitAtFirstUse()) { + ScopedObjectAccess soa(self); + jit->CompileMethod(method, self, kind, /*prejit=*/ false); + } else if (kind == CompilationKind::kBaseline || jit->GetJitCompiler()->IsBaselineCompiler()) { ScopedObjectAccess soa(self); if (jit->TryPatternMatch(method, CompilationKind::kBaseline)) { return; |