summaryrefslogtreecommitdiff
path: root/runtime/class_table.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-11-25 11:47:20 +0000
committer Vladimir Marko <vmarko@google.com> 2016-11-29 13:49:20 +0000
commite47172b75b8b04a450d235cf72bdc4e223a29cb5 (patch)
tree9301e9bc08944f3b4590d9ccf6aa7656cc238adf /runtime/class_table.h
parentd0111420a9f924fe560a97132d09ae531852fd69 (diff)
Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserved.""""
Avoid class loading triggered by verification in the 626-const-class-linking test. Expect spurious wakeups. Add extra debugging output for a very strange failure image_writer.cc:1144] Check failed: !IsBootClassLoaderClass(as_klass) java.lang.Class<java.lang.NoSuchMethodError> That class is supposed to be in the boot image (core.art for tests), so the failing check should not be reached at all. Test: m test-art-host Test: m ART_TEST_OPTIMIZING=true \ ART_TEST_JIT=true \ ART_TEST_INTERPRETER=true \ ART_TEST_INTERPRETER_ACCESS_CHECKS=true \ test-art-host-run-test-626-const-class-linking Bug: 30627598 This reverts commit 09ded9201fbeec605b12741ae255663c14bda225. Change-Id: I65a68cb53f0707b8abb3555ac3dc44c82907aef5
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_)