summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_switch_impl.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-04-28 14:56:54 -0700
committer Andreas Gampe <agampe@google.com> 2016-04-29 17:33:22 -0700
commit56fdd0e63812764bbeb8cc52e376d3fd1f270052 (patch)
tree6988e995bf02f788066fb6e748cd3049fe87d31a /runtime/interpreter/interpreter_switch_impl.cc
parent9d05b59a8595cf7eeece1795eb65b6b8706aad45 (diff)
ART: Disambiguate access-checks mode from lock-counting
Lock-counting (when structural locking verification failed) is a special sub-mode of access-checks and must be disambiguated, because we currently use access-checks mode class-wide when at least one method soft-fails, but do not stop the compiler/JIT to compile the "working" methods. So we may end up in the access-checks interpreter for a working method through deopt without knowing which locks are already held. Bug: 28351535 (cherry picked from commit f517e283d477dd2ae229ee3f054120c6953895db) Change-Id: I083032f064d88df8f8f0611ad8b57d1b39cd09fb
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
-rw-r--r--runtime/interpreter/interpreter_switch_impl.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index 4323d4f425..18330babe0 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -34,8 +34,7 @@ namespace interpreter {
instrumentation); \
if (found_dex_pc == DexFile::kDexNoIndex) { \
/* Structured locking is to be enforced for abnormal termination, too. */ \
- shadow_frame.GetLockCountData(). \
- CheckAllMonitorsReleasedOrThrow<do_assignability_check>(self); \
+ DoMonitorCheckOnExit<do_assignability_check>(self, &shadow_frame); \
if (interpret_one_instruction) { \
/* Signal mterp to return to caller */ \
shadow_frame.SetDexPC(DexFile::kDexNoIndex); \
@@ -57,8 +56,7 @@ namespace interpreter {
} while (false)
#define HANDLE_MONITOR_CHECKS() \
- if (!shadow_frame.GetLockCountData(). \
- CheckAllMonitorsReleasedOrThrow<do_assignability_check>(self)) { \
+ if (!DoMonitorCheckOnExit<do_assignability_check>(self, &shadow_frame)) { \
HANDLE_PENDING_EXCEPTION(); \
}