summaryrefslogtreecommitdiffstats
path: root/runtime/class_table.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2016-11-30 15:31:13 +0000
committerVladimir Marko <vmarko@google.com>2016-12-01 10:13:19 +0000
commitcb5ab35980a86b05586c402924d2e7ca9df25758 (patch)
treeacf33ce7ac7627682aaf822489247ca1804b60d0 /runtime/class_table.h
parent07e6a7947f3279f66f14f7af045065b5297294c2 (diff)
downloadart-cb5ab35980a86b05586c402924d2e7ca9df25758.tar.gz
art-cb5ab35980a86b05586c402924d2e7ca9df25758.tar.bz2
art-cb5ab35980a86b05586c402924d2e7ca9df25758.zip
Make sure that const-class linkage is preserved, try again.
This CL causes occasional test failures on the build servers which we were not able to reproduce locally. So we add some some additional debug output to help pinpoint the cause. Bug: 30627598 Bug: 33231647 Test: m test-art-host This reverts commit 171cf811a1cdf8b1cbc5151505d8630741ce4cf3. Change-Id: Id56a3f0e86e8212fd547e09c61794401bff47fb0
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r--runtime/class_table.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h
index 558c144013..92634a434a 100644
--- a/runtime/class_table.h
+++ b/runtime/class_table.h
@@ -84,10 +84,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)
@@ -173,6 +177,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_)