Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Issue 9696020: Deoptimize functions before setting breakpoints (Closed)

Created:
8 years, 9 months ago by hausner
Modified:
8 years, 9 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Deoptimize functions before setting breakpoints Does not yet handle cases where the functions have active frames on the stack. Committed: https://code.google.com/p/dart/source/detail?r=5436

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -6 lines) Patch
M runtime/vm/code_generator.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/debugger.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 chunks +22 lines, -3 lines 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 2 3 chunks +45 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
hausner
8 years, 9 months ago (2012-03-13 00:53:24 UTC) #1
srdjan
LGTM with comments http://codereview.chromium.org/9696020/diff/3001/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): http://codereview.chromium.org/9696020/diff/3001/runtime/vm/code_generator.cc#newcode1171 runtime/vm/code_generator.cc:1171: if (isolate->debugger()->IsActive()) { Maybe add comment ...
8 years, 9 months ago (2012-03-13 17:11:35 UTC) #2
hausner
8 years, 9 months ago (2012-03-13 20:45:03 UTC) #3
http://codereview.chromium.org/9696020/diff/3001/runtime/vm/code_generator.cc
File runtime/vm/code_generator.cc (right):

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/code_generator.cc...
runtime/vm/code_generator.cc:1171: if (isolate->debugger()->IsActive()) {
On 2012/03/13 17:11:35, srdjan wrote:
> Maybe add comment why we should not optimize when debugger is active.

Done.

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/debugger.cc#newco...
runtime/vm/debugger.cc:25: static const bool verbose = false;
On 2012/03/13 17:11:35, srdjan wrote:
> Why not add a debugger_verbose flag?
Soon I'll give in and do so. So for I intend to remove this flag once the
debugger is fairly stable.

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/debugger.cc#newco...
runtime/vm/debugger.cc:494: printf("Deoptimizing function %s\n",
On 2012/03/13 17:11:35, srdjan wrote:
> OS::Print

Done.

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/debugger.cc#newco...
runtime/vm/debugger.cc:498:
func.set_deoptimization_counter(func.deoptimization_counter() + 1);
On 2012/03/13 17:11:35, srdjan wrote:
> Don't increase the counter otherwise setting and clearing the breakpoint would
> prevent future optimizations. The deopt counter is here to stop endless
> deoptimizations of certain bad-behaving methods,

Done.

http://codereview.chromium.org/9696020/diff/3001/runtime/vm/debugger.cc#newco...
runtime/vm/debugger.cc:514: EnsureFunctionIsDeoptimized(target_function);
The glass is now half full.

On 2012/03/13 17:11:35, srdjan wrote:
> I rather think positive:
> 
> if (target.HasCode()) {
>   EnsureFunctionIsDeoptimized(target_function);
> } else {
>   ...
> }

Powered by Google App Engine
This is Rietveld 408576698