summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-10-15 09:19:15 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-10-16 08:46:12 -0700
commit32cc9ee0cdffecb0ec8d80a7fd55d7dccae3a7ee (patch)
treee394d05cb35fd8a89ae4be0d57635d7fee219ede /runtime/class_linker.cc
parent114873103db3d4d6e0da42ca02bad1ea8826443b (diff)
Change hash table load factors
Changed class table and intern table load factors to query the runtime. The runtime returns load factors based on whether or not we are a low ram device. DescriptorEquals time for class linking goes from 10% -> 1.2% for compiling GmsCore with interpret only. Added test. Bug: 24917584 Change-Id: Iaaf5d2eab1b0c2d188d299e4bc1852cdb3801173
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 4ce52f10f3..395649ed74 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1213,13 +1213,8 @@ mirror::DexCache* ClassLinker::AllocDexCache(Thread* self,
dex_file.NumMethodIds() != 0u || dex_file.NumFieldIds() != 0u) {
// NOTE: We "leak" the raw_arrays because we never destroy the dex cache.
DCHECK(image_pointer_size_ == 4u || image_pointer_size_ == 8u);
- // When cross-compiling for a 32-bit target on a 64-bit host, we need these arrays
- // in the low 4GiB address space so that we can store pointers in 32-bit fields.
- // This is conveniently provided by the linear allocator.
- raw_arrays = reinterpret_cast<uint8_t*>(
- (sizeof(void*) == 8u && image_pointer_size_ == 4u)
- ? Runtime::Current()->GetLinearAlloc()->Alloc(self, layout.Size()) // Zero-initialized.
- : linear_alloc->Alloc(self, layout.Size())); // Zero-initialized.
+ // Zero-initialized.
+ raw_arrays = reinterpret_cast<uint8_t*>(linear_alloc->Alloc(self, layout.Size()));
}
GcRoot<mirror::String>* strings = (dex_file.NumStringIds() == 0u) ? nullptr :
reinterpret_cast<GcRoot<mirror::String>*>(raw_arrays + layout.StringsOffset());