diff options
author | David Srbecky <dsrbecky@google.com> | 2016-03-18 02:15:09 +0000 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2017-01-31 10:15:26 -0800 |
commit | 45aa598cd1773f5eb1705dec13bea059238e054d (patch) | |
tree | f5a6fd7445a74218547cd6c4e28dc835821c355e /runtime/quick_exception_handler.cc | |
parent | f2042db1b41cc21cc540c5ad7d353cbe1e3a32df (diff) |
Deduplicate stack masks
The stack masks repeat often enough so that it is worth deduplicating
them.
Oat size for a large app:
98143600 -> 96722288 (-1.44%)
Bug: 34621054
Test: test-art-host
Change-Id: If73d51e46066357049d5be2e406ae9a32b7ff1f4
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 4e76951189..3ba30112fa 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -408,6 +408,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding); const size_t number_of_vregs = m->GetCodeItem()->registers_size_; uint32_t register_mask = stack_map.GetRegisterMask(encoding.stack_map_encoding); + BitMemoryRegion stack_mask = code_info.GetStackMaskOf(encoding, stack_map); DexRegisterMap vreg_map = IsInInlinedFrame() ? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1, code_info.GetInlineInfoOf(stack_map, encoding), @@ -440,8 +441,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { const uint8_t* addr = reinterpret_cast<const uint8_t*>(GetCurrentQuickFrame()) + offset; value = *reinterpret_cast<const uint32_t*>(addr); uint32_t bit = (offset >> 2); - if (code_info.GetNumberOfStackMaskBits(encoding) > bit && - stack_map.GetStackMaskBit(encoding.stack_map_encoding, bit)) { + if (bit < encoding.stack_mask_size_in_bits && stack_mask.LoadBit(bit)) { is_reference = true; } break; |