diff options
author | Alex Light <allight@google.com> | 2020-03-03 16:51:33 -0800 |
---|---|---|
committer | Alex Light <allight@google.com> | 2020-03-03 16:53:24 -0800 |
commit | 6fc471e510d6a4e9c31fcab6c0542e2efdf50099 (patch) | |
tree | 81e3a310a73380e798a6b26583cb32d642e69468 /runtime/quick_exception_handler.cc | |
parent | 9f92d9b512c41c17b19f90cc3afa495952e17474 (diff) |
Check vreg count on debuggable
Previously we were only performing a check that we got the correct
number of vregs on deoptimization when kIsDebugBuild. Extend this
check to also occur when the runtime is JavaDebuggable.
Bug: 144947842
Test: none
Change-Id: I7d240008391a1499c159e478b59a509e2362e99f
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 90732e1cca..8c68c5c627 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -15,10 +15,12 @@ */ #include "quick_exception_handler.h" +#include <ios> #include "arch/context.h" #include "art_method-inl.h" #include "base/enums.h" +#include "base/globals.h" #include "base/logging.h" // For VLOG_IS_ON. #include "base/systrace.h" #include "dex/dex_file_types.h" @@ -465,7 +467,12 @@ class DeoptimizeStackVisitor final : public StackVisitor { ? code_info.GetInlineDexRegisterMapOf(stack_map, GetCurrentInlinedFrame()) : code_info.GetDexRegisterMapOf(stack_map); - DCHECK_EQ(vreg_map.size(), number_of_vregs); + if (kIsDebugBuild || UNLIKELY(Runtime::Current()->IsJavaDebuggable())) { + CHECK_EQ(vreg_map.size(), number_of_vregs) << *Thread::Current() + << "Deopting: " << m->PrettyMethod() + << " inlined? " + << std::boolalpha << IsInInlinedFrame(); + } if (vreg_map.empty()) { return; } |