diff options
author | David Brazdil <dbrazdil@google.com> | 2015-10-28 12:19:06 -0500 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-10-28 20:16:06 -0500 |
commit | efc3f02504e8e3768cc18ab5347c5a6d19d6a935 (patch) | |
tree | 43dcd255401c6270b83ef83a95a5ab00416ad535 /runtime/quick_exception_handler.cc | |
parent | 5f2e628b280dfc5f8385e489d44cc0960fcea484 (diff) |
ART: Fix deopt from optimized code under inlining
Deoptimization of inlined frames would use the outer method's
vreg map, thus starting interpreter in bogus state.
Bug: 25331616
Change-Id: I1d4aefc731bb1386f3e6186a89b59981836480b3
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 53b4f3a3b5..1552318c1e 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -372,9 +372,14 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { StackMapEncoding encoding = code_info.ExtractEncoding(); StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding); const size_t number_of_vregs = m->GetCodeItem()->registers_size_; - DexRegisterMap vreg_map = code_info.GetDexRegisterMapOf(stack_map, encoding, number_of_vregs); MemoryRegion stack_mask = stack_map.GetStackMask(encoding); uint32_t register_mask = stack_map.GetRegisterMask(encoding); + DexRegisterMap vreg_map = IsInInlinedFrame() + ? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1, + code_info.GetInlineInfoOf(stack_map, encoding), + encoding, + number_of_vregs) + : code_info.GetDexRegisterMapOf(stack_map, encoding, number_of_vregs); for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) { if (updated_vregs != nullptr && updated_vregs[vreg]) { |