From c8a694ddbcda17fc90121d7e7985d90d3860a60c Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 17 Jan 2022 17:12:38 +0000 Subject: Reland "Use InitializeMethodsCode when we need to reinitialize a method entrypoint." This reverts commit b0f63c93e44bf53a34dda90c74b8725a932922da. Reason for revert: Fix For proxy init. Test: test.py Change-Id: I6b4796115d73a093f86309cec1f03cafd981c2e9 --- compiler/common_compiler_test.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 1b69f2a1d4..bbb2016566 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -149,20 +149,18 @@ const void* CommonCompilerTestImpl::MakeExecutable(ArrayRef code, void CommonCompilerTestImpl::MakeExecutable(ArtMethod* method, const CompiledMethod* compiled_method) { CHECK(method != nullptr); + const void* method_code = nullptr; // If the code size is 0 it means the method was skipped due to profile guided compilation. if (compiled_method != nullptr && compiled_method->GetQuickCode().size() != 0u) { const void* code_ptr = MakeExecutable(compiled_method->GetQuickCode(), compiled_method->GetVmapTable(), compiled_method->GetInstructionSet()); - const void* method_code = + method_code = CompiledMethod::CodePointer(code_ptr, compiled_method->GetInstructionSet()); LOG(INFO) << "MakeExecutable " << method->PrettyMethod() << " code=" << method_code; - method->SetEntryPointFromQuickCompiledCode(method_code); - } else { - // No code? You must mean to go into the interpreter. - // Or the generic JNI... - GetClassLinker()->SetEntryPointsToInterpreter(method); } + Runtime::Current()->GetInstrumentation()->InitializeMethodsCode( + method, /*aot_code=*/ method_code); } void CommonCompilerTestImpl::SetUp() { -- cgit v1.2.3-59-g8ed1b