summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2022-01-13 17:49:37 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2022-01-14 09:03:20 +0000
commitb0f63c93e44bf53a34dda90c74b8725a932922da (patch)
treee3a62f7c90ed6aacbec3387558a2e077db91a522 /compiler
parent3ba3a77e4971b1ae411a18debc5e3507885c3b45 (diff)
Revert "Use InitializeMethodsCode when we need to reinitialize a method entrypoint."
This reverts commit 82e525a4f5f08a72ea1b6907c0a10dacb77a8a87. Reason for revert: Fails a test Change-Id: Iab83b543b99fb6f6d5d9be22cd10d4eb88312d4b
Diffstat (limited to 'compiler')
-rw-r--r--compiler/common_compiler_test.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index bbb2016566..1b69f2a1d4 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -149,18 +149,20 @@ 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());
- method_code =
+ const void* 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() {