Avoid using dex cache array pointers in libart.
In preparation for making dex cache arrays native, avoid
using them in Java code.
This causes a performance regression for our reflection
benchmarks. Class_getDeclaredMethod and Class_getMethod
take an up to 30% hit, measured using the Quick compiler.
We accept this hit at this stage and we will tune the
performance after we're done with the larger effort.
Companion libcore/ change:
https://android-review.googlesource.com/146069
Bug: 20134538
Change-Id: Ibbef3b50043a1311cd40723ed42e1f1c609b8fc1
diff --git a/runtime/mirror/art_method-inl.h b/runtime/mirror/art_method-inl.h
index 0ccf5db..fb427dc 100644
--- a/runtime/mirror/art_method-inl.h
+++ b/runtime/mirror/art_method-inl.h
@@ -36,7 +36,7 @@
namespace mirror {
inline uint32_t ArtMethod::ClassSize() {
- uint32_t vtable_entries = Object::kVTableLength + 8;
+ uint32_t vtable_entries = Object::kVTableLength + 7;
return Class::ComputeClassSize(true, vtable_entries, 0, 0, 0, 0, 0);
}