Mark more roots.
This is most of the stuff. (Everything that currently exists, though there's
more to come.)
Change-Id: I235a21b006820a027c494374a5b52ffefed89c32
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index 685ac2e..c9e4839 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -2862,6 +2862,18 @@
return libraries->FindNativeMethod(m);
}
+void JavaVMExt::VisitRoots(Heap::RootVisitor* visitor, void* arg) {
+ {
+ MutexLock mu(globals_lock);
+ globals.VisitRoots(visitor, arg);
+ }
+ {
+ MutexLock mu(pins_lock);
+ pin_table.VisitRoots(visitor, arg);
+ }
+ // The weak_globals table is visited by the GC itself (because it mutates the table).
+}
+
} // namespace art
std::ostream& operator<<(std::ostream& os, const jobjectRefType& rhs) {