Hash-based DexCache methods array.
Total boot*.art size for aosp_angler-userdebug:
- arm64:
- before: 11603968
- after: 10129408 (-1.4MiB, -12.7%)
- arm:
- before: 8626176
- after: 7888896 (-0.7MiB, -8.5%)
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: Nexus 6P boots.
Test: testrunner.py --target
Test: Build aosp_mips64-eng
Bug: 30627598
Change-Id: I7f858605de5f074cbd7f0d9c4c072fbd44aee28f
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index ae26e7d..7bd71e8 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -2233,16 +2233,15 @@
if (num_methods != 0u) {
os << "Methods (size=" << num_methods << "):\n";
ScopedIndentation indent2(&vios_);
- auto* resolved_methods = dex_cache->GetResolvedMethods();
+ mirror::MethodDexCacheType* resolved_methods = dex_cache->GetResolvedMethods();
for (size_t i = 0, length = dex_cache->NumResolvedMethods(); i < length; ++i) {
- auto* elem = mirror::DexCache::GetElementPtrSize(resolved_methods,
- i,
- image_pointer_size);
+ ArtMethod* elem = mirror::DexCache::GetNativePairPtrSize(
+ resolved_methods, i, image_pointer_size).object;
size_t run = 0;
for (size_t j = i + 1;
- j != length && elem == mirror::DexCache::GetElementPtrSize(resolved_methods,
- j,
- image_pointer_size);
+ j != length &&
+ elem == mirror::DexCache::GetNativePairPtrSize(
+ resolved_methods, j, image_pointer_size).object;
++j) {
++run;
}
@@ -2270,7 +2269,7 @@
ScopedIndentation indent2(&vios_);
auto* resolved_fields = dex_cache->GetResolvedFields();
for (size_t i = 0, length = dex_cache->NumResolvedFields(); i < length; ++i) {
- auto* elem = mirror::DexCache::GetNativePairPtrSize(
+ ArtField* elem = mirror::DexCache::GetNativePairPtrSize(
resolved_fields, i, image_pointer_size).object;
size_t run = 0;
for (size_t j = i + 1;