summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache.cc
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 /runtime/jit/jit_code_cache.cc
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 'runtime/jit/jit_code_cache.cc')
-rw-r--r--runtime/jit/jit_code_cache.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 34ddfc4233..8b91f9eee1 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -793,7 +793,8 @@ bool JitCodeCache::RemoveMethod(ArtMethod* method, bool release_memory) {
}
ClearMethodCounter(method, /* was_warm= */ false);
- Runtime::Current()->GetInstrumentation()->InitializeMethodsCode(method, /*aot_code=*/ nullptr);
+ Runtime::Current()->GetInstrumentation()->UpdateMethodsCode(
+ method, GetQuickToInterpreterBridge());
VLOG(jit)
<< "JIT removed (osr=" << std::boolalpha << osr << std::noboolalpha << ") "
<< ArtMethod::PrettyMethod(method) << "@" << method
@@ -1317,8 +1318,7 @@ void JitCodeCache::DoCollection(Thread* self, bool collect_profiling_info) {
OatQuickMethodHeader::FromEntryPoint(entry_point);
if (CodeInfo::IsBaseline(method_header->GetOptimizedCodeInfoPtr())) {
info->GetMethod()->ResetCounter(warmup_threshold);
- Runtime::Current()->GetInstrumentation()->InitializeMethodsCode(
- info->GetMethod(), /*aot_code=*/ nullptr);
+ info->GetMethod()->SetEntryPointFromQuickCompiledCode(GetQuickToInterpreterBridge());
}
}
}
@@ -1744,7 +1744,7 @@ void JitCodeCache::InvalidateAllCompiledCode() {
if (meth->IsObsolete()) {
linker->SetEntryPointsForObsoleteMethod(meth);
} else {
- Runtime::Current()->GetInstrumentation()->InitializeMethodsCode(meth, /*aot_code=*/ nullptr);
+ linker->SetEntryPointsToInterpreter(meth);
}
}
saved_compiled_methods_map_.clear();
@@ -1761,7 +1761,8 @@ void JitCodeCache::InvalidateCompiledCodeFor(ArtMethod* method,
if (method_entrypoint == header->GetEntryPoint()) {
// The entrypoint is the one to invalidate, so we just update it to the interpreter entry point
// and clear the counter to get the method Jitted again.
- Runtime::Current()->GetInstrumentation()->InitializeMethodsCode(method, /*aot_code=*/ nullptr);
+ Runtime::Current()->GetInstrumentation()->UpdateMethodsCode(
+ method, GetQuickToInterpreterBridge());
ClearMethodCounter(method, /*was_warm=*/ true);
} else {
MutexLock mu(Thread::Current(), *Locks::jit_lock_);