summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-12-04 10:21:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-04 10:21:02 +0000
commitbaede348efa86600e64fb9db43cec1eef07c86d9 (patch)
tree7ab2c2a69c72b7cd2ce1b7bf1ed9d26b07e4fd7e /runtime/debugger.cc
parent989210eb453898bd94bf3527f18f6146b07aa4bb (diff)
parent6963e44331258b131bcc0599b868ba15902d6d22 (diff)
downloadandroid_art-baede348efa86600e64fb9db43cec1eef07c86d9.tar.gz
android_art-baede348efa86600e64fb9db43cec1eef07c86d9.tar.bz2
android_art-baede348efa86600e64fb9db43cec1eef07c86d9.zip
Merge "JDWP: fix breakpoint for method in the image"
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r--runtime/debugger.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index d5cba50582..a9b70cbaa1 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -3264,8 +3264,16 @@ static DeoptimizationRequest::Kind GetRequiredDeoptimizationKind(Thread* self,
ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
const bool is_compiled = class_linker->GetOatMethodQuickCodeFor(m) != nullptr;
if (is_compiled) {
- VLOG(jdwp) << "Need selective deoptimization for compiled method " << PrettyMethod(m);
- return DeoptimizationRequest::kSelectiveDeoptimization;
+ // If the method may be called through its direct code pointer (without loading
+ // its updated entrypoint), we need full deoptimization to not miss the breakpoint.
+ if (class_linker->MayBeCalledWithDirectCodePointer(m)) {
+ VLOG(jdwp) << "Need full deoptimization because of possible direct code call "
+ << "into image for compiled method " << PrettyMethod(m);
+ return DeoptimizationRequest::kFullDeoptimization;
+ } else {
+ VLOG(jdwp) << "Need selective deoptimization for compiled method " << PrettyMethod(m);
+ return DeoptimizationRequest::kSelectiveDeoptimization;
+ }
} else {
// Method is not compiled: we don't need to deoptimize.
VLOG(jdwp) << "No need for deoptimization for non-compiled method " << PrettyMethod(m);