OSDN Git Service

JDWP: only deoptimize when it is required
authorSebastien Hertz <shertz@google.com>
Mon, 17 Nov 2014 18:00:37 +0000 (19:00 +0100)
committerSebastien Hertz <shertz@google.com>
Wed, 19 Nov 2014 13:35:28 +0000 (14:35 +0100)
commitf3928794a10516e2ac0ffe2686a10891788d4b9c
tree31648cbd1b6aa6bd7552c4d2664214626b702004
parentbf75c5cf32a47eecadcc5e4a324237c1f1d09cde
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
runtime/debugger.cc
runtime/debugger.h
runtime/jdwp/jdwp_event.cc