summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2022-01-12 10:42:44 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2022-01-13 15:41:49 +0000
commit82e525a4f5f08a72ea1b6907c0a10dacb77a8a87 (patch)
tree1912cf2684ce1286d3dc1aebf7e042445799672e /compiler/common_compiler_test.cc
parent748cfeff436356f962ebaaa0743cfe44133a4baa (diff)
Use InitializeMethodsCode when we need to reinitialize a method entrypoint.
To make sure we use the best available entrypoint in such situations. Test: test.py Change-Id: I255b708464d62d7f628f51a200af465303f92fba
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc10
1 files changed, 4 insertions, 6 deletions
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<const uint8_t> 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() {