diff options
author | Artem Serov <artem.serov@linaro.org> | 2018-12-20 19:15:11 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2019-07-15 09:30:36 +0000 |
commit | 2808be84a8f86542450670acdb5e6b55498ff5f0 (patch) | |
tree | f41b63e3109a6a6a9bd534f32b8d92f20eb9ef35 /runtime/quick_exception_handler.cc | |
parent | 460f05480379d5c75555d06c4938bc990ce6ff83 (diff) |
ART: Introduce stackmap with no DexRegInfo.
Some of safepoints don't need to have DexRegisterMap info;
this will decrease the stackmap size.
.oat file size reduction:
- boot.oat: -233 kb (-5.4%)
- boot-framework.oat: -704 kb (-4.9%)
Test: 461-get-reference-vreg, 466-get-live-vreg.
Test: 543-env-long-ref, 616-cha*.
Test: test-art-target, +gc-stress.
Change-Id: Idbad355770e30a30dcf14127642e03ee666878b8
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 3bc718b058..1777b3d0ff 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -301,10 +301,11 @@ void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor* StackMap catch_stack_map = code_info.GetCatchStackMapForDexPc(GetHandlerDexPc()); DCHECK(catch_stack_map.IsValid()); DexRegisterMap catch_vreg_map = code_info.GetDexRegisterMapOf(catch_stack_map); + DCHECK_EQ(catch_vreg_map.size(), number_of_vregs); + if (!catch_vreg_map.HasAnyLiveDexRegisters()) { return; } - DCHECK_EQ(catch_vreg_map.size(), number_of_vregs); // Find stack map of the throwing instruction. StackMap throw_stack_map = @@ -478,10 +479,11 @@ class DeoptimizeStackVisitor final : public StackVisitor { DexRegisterMap vreg_map = IsInInlinedFrame() ? code_info.GetInlineDexRegisterMapOf(stack_map, GetCurrentInlinedFrame()) : code_info.GetDexRegisterMapOf(stack_map); + + DCHECK_EQ(vreg_map.size(), number_of_vregs); if (vreg_map.empty()) { return; } - DCHECK_EQ(vreg_map.size(), number_of_vregs); for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) { if (updated_vregs != nullptr && updated_vregs[vreg]) { |