Always visit object class from VisitReferences
We don't want to unload classes which have instances.
Slight increase in CMS GC time from ~6.5s to ~7.3s on
EvaluateAndApplyChanges.
Bug: 22720414
Change-Id: I467ff9c9d55163d2a90b999aef3bdd7b3f648bac
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index fa4667e..fa25a17 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1109,7 +1109,7 @@
// If it is not a DexCache, visit all references.
mirror::Class* klass = object->GetClass();
if (klass != dex_cache_class_) {
- object->VisitReferences<false /* visit class */>(*this, *this);
+ object->VisitReferences(*this, *this);
}
}