summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-11-06 22:39:52 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-11-07 10:45:26 +0000
commiteffa0a6222b07f6ee7aad734e6ef72376ed94a2c (patch)
tree96cd05826194dab0cf23fd971fb46113e5afcd10 /runtime/jit/jit_code_cache.cc
parent10f07e0ceb600a84c6805212efaf119d49eaeeb2 (diff)
Reland "Fix pathological deoptimization case."
This reverts commit 4384e944119846a2bc1d699a8c366baf9ac24c8e. Reason for revert: use the right bottom shadow frame for the inline cache. Change-Id: Ia3208bd0792dd3a615763ef146973e0c84cf31b4
Diffstat (limited to 'runtime/jit/jit_code_cache.cc')
-rw-r--r--runtime/jit/jit_code_cache.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 845f6eb8fb..30703e3eb5 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -1316,6 +1316,21 @@ ProfilingInfo* JitCodeCache::GetProfilingInfo(ArtMethod* method, Thread* self) {
return it->second;
}
+void JitCodeCache::MaybeUpdateInlineCache(ArtMethod* method,
+ uint32_t dex_pc,
+ ObjPtr<mirror::Class> cls,
+ Thread* self) {
+ ScopedDebugDisallowReadBarriers sddrb(self);
+ MutexLock mu(self, *Locks::jit_lock_);
+ auto it = profiling_infos_.find(method);
+ if (it == profiling_infos_.end()) {
+ return;
+ }
+ ProfilingInfo* info = it->second;
+ ScopedAssertNoThreadSuspension sants("ProfilingInfo");
+ info->AddInvokeInfo(dex_pc, cls.Ptr());
+}
+
void JitCodeCache::ResetHotnessCounter(ArtMethod* method, Thread* self) {
ScopedDebugDisallowReadBarriers sddrb(self);
MutexLock mu(self, *Locks::jit_lock_);