diff options
Diffstat (limited to 'runtime/cha.cc')
| -rw-r--r-- | runtime/cha.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/cha.cc b/runtime/cha.cc index 8eeebf30ed..6c011e8e39 100644 --- a/runtime/cha.cc +++ b/runtime/cha.cc @@ -19,6 +19,7 @@ #include "art_method-inl.h" #include "jit/jit.h" #include "jit/jit_code_cache.h" +#include "linear_alloc.h" #include "runtime.h" #include "scoped_thread_state_change-inl.h" #include "stack.h" @@ -581,4 +582,17 @@ void ClassHierarchyAnalysis::InvalidateSingleImplementationMethods( } } +void ClassHierarchyAnalysis::RemoveDependenciesForLinearAlloc(const LinearAlloc* linear_alloc) { + MutexLock mu(Thread::Current(), *Locks::cha_lock_); + for (auto it = cha_dependency_map_.begin(); it != cha_dependency_map_.end(); ) { + // Use unsafe to avoid locking since the allocator is going to be deleted. + if (linear_alloc->ContainsUnsafe(it->first)) { + // About to delete the ArtMethod, erase the entry from the map. + it = cha_dependency_map_.erase(it); + } else { + ++it; + } + } +} + } // namespace art |