summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.h
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-11-17 19:00:37 +0100
committerSebastien Hertz <shertz@google.com>2014-11-19 14:35:28 +0100
commitf3928794a10516e2ac0ffe2686a10891788d4b9c (patch)
tree31648cbd1b6aa6bd7552c4d2664214626b702004 /runtime/debugger.h
parentbf75c5cf32a47eecadcc5e4a324237c1f1d09cde (diff)
downloadart-f3928794a10516e2ac0ffe2686a10891788d4b9c.tar.gz
art-f3928794a10516e2ac0ffe2686a10891788d4b9c.tar.bz2
art-f3928794a10516e2ac0ffe2686a10891788d4b9c.zip
JDWP: only deoptimize when it is required
We don't need to deoptimize anything when we forced the use of the interpreter (-Xint). In this case, no compiled code is executed (except native methods which are not concerned by deoptimization). Therefore we even don't need to enable/disable deoptimization support in instrumentation. We also don't need to deoptimize a method that hasn't been compiled. Since it will run with interpreter, there is no point deoptimizing it. However this method may be inlined in a compiled caller method so we still need to deoptimize everything in this case. This CL updates breakpoint support by storing the required kind of deoptimization for a particular method. There are 3 cases: - kNothing: the method does not require deoptimization. - kSelectiveDeoptimization: the method needs to be deoptimized. - kFullDeoptimization: we must deoptimize everythinig. When uninstalling a breakpoint, we need to do the reverse operation. Also fixes the SanityCheckExistingBreakpoints function to control breakpoints related to the given method only and adds extra verbose logs when choosing the appropriate deoptimization kind. Bug: 18407046 Change-Id: I5212c1fd2f72e06c79e7871db15696824d37dc0b
Diffstat (limited to 'runtime/debugger.h')
-rw-r--r--runtime/debugger.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 488ba7f728..92031634cd 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -523,6 +523,9 @@ class Dbg {
LOCKS_EXCLUDED(Locks::breakpoint_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // Indicates whether we need deoptimization for debugging.
+ static bool RequiresDeoptimization();
+
// Records deoptimization request in the queue.
static void RequestDeoptimization(const DeoptimizationRequest& req)
LOCKS_EXCLUDED(Locks::deoptimization_lock_)