summaryrefslogtreecommitdiff
path: root/runtime/class_table.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-08-06 15:34:15 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-08-12 15:50:24 -0700
commite4275c07e9852a6944f47efa9d0591fceb8e8e36 (patch)
tree92d5e69374f88555f454d137e5d60fb1c925b4d8 /runtime/class_table.h
parent82b844fb449ddc5d7b4e43e71a55eb934a1b0b45 (diff)
Visit class roots from ClassLoader::VisitReferences
This causes the classes of a class loader to get marked when that class loader gets marked instead of during class root visiting. Bug: 22720414 Change-Id: If53f042aff1d9f7bf94ecbe6886601edda029b7d
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r--runtime/class_table.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h
index 418295449f..6b18d9009d 100644
--- a/runtime/class_table.h
+++ b/runtime/class_table.h
@@ -67,8 +67,15 @@ class ClassTable {
mirror::Class* UpdateClass(const char* descriptor, mirror::Class* new_klass, size_t hash)
REQUIRES(Locks::classlinker_classes_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
- void VisitRoots(RootVisitor* visitor, VisitRootFlags flags)
- REQUIRES(Locks::classlinker_classes_lock_) SHARED_REQUIRES(Locks::mutator_lock_);
+ // NO_THREAD_SAFETY_ANALYSIS for object marking requiring heap bitmap lock.
+ template<class Visitor>
+ void VisitRoots(Visitor& visitor)
+ SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_)
+ NO_THREAD_SAFETY_ANALYSIS;
+ template<class Visitor>
+ void VisitRoots(const Visitor& visitor)
+ SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_)
+ NO_THREAD_SAFETY_ANALYSIS;
// Return false if the callback told us to exit.
bool Visit(ClassVisitor* visitor)