From b8aa1e4c10dcdc7fef96634f87e259dfee83a1cf Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 5 Apr 2016 14:36:57 -0700 Subject: Shard classloader classes lock Used to guard adding and removing classes. Previously we used the class linker classes lock, but this had a deadlock issue since the reference processor may need to acquire the lock to mark the classes of a class loader. Another thread could be blocked trying to access weak globals while also holding the class linker classes lock. Bug: 27946564 (cherry picked from commit 1609e3a42051769f4a8be3b6731e7bb2f828b3bb) Change-Id: Ic5cfe573c4e6822d49ad0862ffdd9d036e439a96 --- runtime/mirror/class_loader-inl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/mirror/class_loader-inl.h') diff --git a/runtime/mirror/class_loader-inl.h b/runtime/mirror/class_loader-inl.h index 84fa80f023..cc910b035a 100644 --- a/runtime/mirror/class_loader-inl.h +++ b/runtime/mirror/class_loader-inl.h @@ -34,7 +34,6 @@ inline void ClassLoader::VisitReferences(mirror::Class* klass, const Visitor& vi VisitInstanceFieldsReferences(klass, visitor); if (kVisitClasses) { // Visit classes loaded after. - ReaderMutexLock mu(Thread::Current(), *Locks::classlinker_classes_lock_); ClassTable* const class_table = GetClassTable(); if (class_table != nullptr) { class_table->VisitRoots(visitor); -- cgit v1.2.3-59-g8ed1b