diff options
author | 2024-12-17 13:36:18 +0000 | |
---|---|---|
committer | 2024-12-18 02:36:34 -0800 | |
commit | f8a57338dce3af596799eb44daa60333cc3894a3 (patch) | |
tree | 3ff9256de0dd2466d21beb0e547cb99e24b24cdb /runtime/jit/jit_code_cache.h | |
parent | 37ec22b569fceb88b0f6ffa6ff2acc027dae904c (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.h')
-rw-r--r-- | runtime/jit/jit_code_cache.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index 2d2f841360..84b56f1247 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -359,8 +359,10 @@ class JitCodeCache { // Visit GC roots (except j.l.Class and j.l.String) held by JIT-ed code. template<typename RootVisitorType> - EXPORT void VisitRootTables(ArtMethod* method, - RootVisitorType& visitor) NO_THREAD_SAFETY_ANALYSIS; + EXPORT void VisitRootTables(ArtMethod* method, RootVisitorType& visitor) + REQUIRES(Locks::heap_bitmap_lock_) + REQUIRES(!Locks::jit_mutator_lock_) + REQUIRES_SHARED(Locks::mutator_lock_); void SweepRootTables(IsMarkedVisitor* visitor) REQUIRES(!Locks::jit_lock_) |