summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-12-17 13:36:18 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2024-12-18 02:36:34 -0800
commitf8a57338dce3af596799eb44daa60333cc3894a3 (patch)
tree3ff9256de0dd2466d21beb0e547cb99e24b24cdb /runtime/jit/jit_code_cache-inl.h
parent37ec22b569fceb88b0f6ffa6ff2acc027dae904c (diff)
Use jit_mutator_lock in JitCodeCache::VisitRootTables.
method_code_map_reversed_ is protected by jit_mutator_lock_. Also remove the no thread safety analysis from the method. Test: build and test.py Bug: 384182628 Change-Id: I2780d10e7792f0f3502a05f354b9de9488998437
Diffstat (limited to 'runtime/jit/jit_code_cache-inl.h')
-rw-r--r--runtime/jit/jit_code_cache-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/jit/jit_code_cache-inl.h b/runtime/jit/jit_code_cache-inl.h
index fab2073e55..b4553a1ec3 100644
--- a/runtime/jit/jit_code_cache-inl.h
+++ b/runtime/jit/jit_code_cache-inl.h
@@ -38,7 +38,7 @@ EXPORT void JitCodeCache::VisitRootTables(ArtMethod* method, RootVisitorType& vi
Thread* self = Thread::Current();
ScopedDebugDisallowReadBarriers sddrb(self);
- MutexLock mu(self, *Locks::jit_lock_);
+ ReaderMutexLock mu(self, *Locks::jit_mutator_lock_);
auto code_ptrs_it = method_code_map_reversed_.find(method);
if (code_ptrs_it == method_code_map_reversed_.end()) {