From c5798bf82fc0ccd0bb90e0813d8e63df4d0576cc Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 9 Dec 2016 10:20:54 +0000 Subject: Revert^8 "Make sure that const-class linkage is preserved." Replaced two ReaderMutexLocks with WriterMutexLocks. Removed some unnecessary debugging output. Test: m test-art-host Bug: 30627598 Original-Change-Id: Ie9b721464b4e9a5dcce8df8095548e983bba1fe8 This reverts commit 2c8c6b63da6ecb2ac701cc30f9b4fa4a8eea5cc8. Change-Id: I3a1aeecf64e4b202cef61cceb248d48106a2f4a6 --- runtime/class_table.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'runtime/class_table.h') diff --git a/runtime/class_table.h b/runtime/class_table.h index fe0bbb3726..104871ff21 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -142,10 +142,14 @@ class ClassTable { REQUIRES_SHARED(Locks::mutator_lock_); // Returns the number of classes in previous snapshots. - size_t NumZygoteClasses() const REQUIRES(!lock_); + size_t NumZygoteClasses(ObjPtr defining_loader) const + REQUIRES(!lock_) + REQUIRES_SHARED(Locks::mutator_lock_); // Returns all off the classes in the lastest snapshot. - size_t NumNonZygoteClasses() const REQUIRES(!lock_); + size_t NumNonZygoteClasses(ObjPtr defining_loader) const + REQUIRES(!lock_) + REQUIRES_SHARED(Locks::mutator_lock_); // Update a class in the table with the new class. Returns the existing class which was replaced. mirror::Class* UpdateClass(const char* descriptor, mirror::Class* new_klass, size_t hash) @@ -231,6 +235,11 @@ class ClassTable { private: void InsertWithoutLocks(ObjPtr klass) NO_THREAD_SAFETY_ANALYSIS; + size_t CountDefiningLoaderClasses(ObjPtr defining_loader, + const ClassSet& set) const + REQUIRES(lock_) + REQUIRES_SHARED(Locks::mutator_lock_); + // Return true if we inserted the oat file, false if it already exists. bool InsertOatFileLocked(const OatFile* oat_file) REQUIRES(lock_) -- cgit v1.2.3-59-g8ed1b