From 474e99956e8be96e84404b5be6ad075bb5cb6b79 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 12 Feb 2025 10:25:46 +0000 Subject: Refactor `ArtMethod` entrypoint initialization. Introduce `Instrumentation::ReinitializeMethodsCode()` for the cases where we want to reset the entrypoint after the method has already been initialized. Keep the old function `Instrumentation::InitializeMethodsCode()` exclusively for the initialization of a newly loaded method's entrypoint, split out the work that can be done in suspended state and remove any unnecessary work. For example, we do not use the Nterp entrypoint until the class has been verified, so all the Nterp checks can be removed. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 329196666 Change-Id: I1d0c195b0118fe50434d496f56346a9f744fbaf7 --- runtime/quick_exception_handler.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/quick_exception_handler.cc') diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 09bbb2ab9e..365a63459d 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -745,8 +745,7 @@ void QuickExceptionHandler::DeoptimizeSingleFrame(DeoptimizationKind kind) { runtime->GetJit()->GetCodeCache()->InvalidateCompiledCodeFor( deopt_method, visitor.GetSingleFrameDeoptQuickMethodHeader()); } else { - runtime->GetInstrumentation()->InitializeMethodsCode( - deopt_method, /*aot_code=*/ nullptr); + runtime->GetInstrumentation()->ReinitializeMethodsCode(deopt_method); } // If the deoptimization is due to an inline cache, update it with the type -- cgit v1.2.3-59-g8ed1b