diff options
author | 2017-09-05 09:32:49 -0700 | |
---|---|---|
committer | 2017-09-05 10:54:05 -0700 | |
commit | 9fb1ab1f6bb58bdaccef78bc81b3202d0121e2ed (patch) | |
tree | f4ec9bb10a2191f4aa80b1ee40332071bed38bab /runtime/interpreter/interpreter_common.h | |
parent | c101222c854a0c476f5b6ae64e20adbd38126a3c (diff) |
Revert "Revert "JVMTI Exception and ExceptionCatch events""
Fixed error where we were incorrectly not updating a ShadowFrame
dex_pc causing deoptimization errors.
Bug: 62821960
Bug: 65049545
Test: ./test.py --host -j50
Test: ./art/tools/run-libcore-tests.sh \
--mode=host --variant-X32 --debug
This reverts commit 959742483885779f106e000df6dd422fc8657931.
Change-Id: I91ab2bc3e645ddf0359c189b19a59a3ecf0d8921
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r-- | runtime/interpreter/interpreter_common.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 5b942f2e73..82e12f5c6a 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -462,9 +462,17 @@ static inline int32_t DoSparseSwitch(const Instruction* inst, const ShadowFrame& return 3; } -uint32_t FindNextInstructionFollowingException(Thread* self, ShadowFrame& shadow_frame, - uint32_t dex_pc, const instrumentation::Instrumentation* instrumentation) - REQUIRES_SHARED(Locks::mutator_lock_); +// We execute any instrumentation events triggered by throwing and/or handing the pending exception +// and change the shadow_frames dex_pc to the appropriate exception handler if the current method +// has one. If the exception has been handled and the shadow_frame is now pointing to a catch clause +// we return true. If the current method is unable to handle the exception we return false. +// This function accepts a null Instrumentation* as a way to cause instrumentation events not to be +// reported. +// TODO We might wish to reconsider how we cause some events to be ignored. +bool MoveToExceptionHandler(Thread* self, + ShadowFrame& shadow_frame, + const instrumentation::Instrumentation* instrumentation) + REQUIRES_SHARED(Locks::mutator_lock_); NO_RETURN void UnexpectedOpcode(const Instruction* inst, const ShadowFrame& shadow_frame) __attribute__((cold)) |