diff options
author | 2016-12-09 10:20:54 +0000 | |
---|---|---|
committer | 2016-12-09 13:02:40 +0000 | |
commit | c5798bf82fc0ccd0bb90e0813d8e63df4d0576cc (patch) | |
tree | 89c94659ad977b66f4d2a90981ed7c63c0af636a /runtime/class_table.h | |
parent | aea9ffece7eb32f3884a4ad0553e1df4d90fd9e4 (diff) |
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
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r-- | runtime/class_table.h | 13 |
1 files changed, 11 insertions, 2 deletions
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<mirror::ClassLoader> 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<mirror::ClassLoader> 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<mirror::Class> klass) NO_THREAD_SAFETY_ANALYSIS; + size_t CountDefiningLoaderClasses(ObjPtr<mirror::ClassLoader> 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_) |