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/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index 713797f..a9a236f 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -1063,7 +1063,7 @@
}
GcRootVisitor visitor(this);
- obj->VisitReferences<true>(visitor, VoidFunctor());
+ obj->VisitReferences(visitor, VoidFunctor());
gc::Heap* const heap = Runtime::Current()->GetHeap();
const gc::space::ContinuousSpace* const space = heap->FindContinuousSpaceFromObject(obj, true);