summaryrefslogtreecommitdiff
path: root/runtime/mirror/object_array-inl.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-08-18 13:54:21 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-08-18 16:11:21 -0700
commit059ef3ddb2088f926ac452889e0953fdcd646a5e (patch)
tree36067457d7e4aba11be908ddd235734d29b7c4f2 /runtime/mirror/object_array-inl.h
parentf71ad9ede9ae322a897e8fe407208dc35c5dee65 (diff)
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
Diffstat (limited to 'runtime/mirror/object_array-inl.h')
-rw-r--r--runtime/mirror/object_array-inl.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h
index 4a7e7b35da..5b73557941 100644
--- a/runtime/mirror/object_array-inl.h
+++ b/runtime/mirror/object_array-inl.h
@@ -269,11 +269,8 @@ inline MemberOffset ObjectArray<T>::OffsetOfElement(int32_t i) {
(i * sizeof(HeapReference<Object>)));
}
-template<class T> template<const bool kVisitClass, typename Visitor>
+template<class T> template<typename Visitor>
void ObjectArray<T>::VisitReferences(const Visitor& visitor) {
- if (kVisitClass) {
- visitor(this, ClassOffset(), false);
- }
const size_t length = static_cast<size_t>(GetLength());
for (size_t i = 0; i < length; ++i) {
visitor(this, OffsetOfElement(i), false);