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

Issue 10912146: Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot. (Closed)

Created:
8 years, 3 months ago by srdjan
Modified:
8 years, 3 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, Vyacheslav Egorov (Google), Kevin Millikin (Google)
Visibility:
Public.

Description

Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot. Committed: https://code.google.com/p/dart/source/detail?r=12093

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -58 lines) Patch
M runtime/vm/code_generator.cc View 1 2 3 4 2 chunks +17 lines, -1 line 0 comments Download
M runtime/vm/code_patcher.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M runtime/vm/code_patcher_arm.cc View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M runtime/vm/code_patcher_ia32.cc View 1 2 3 4 1 chunk +4 lines, -12 lines 0 comments Download
M runtime/vm/code_patcher_x64.cc View 1 2 3 4 1 chunk +4 lines, -9 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 4 1 chunk +7 lines, -5 lines 0 comments Download
M runtime/vm/instructions_x64.h View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M runtime/vm/instructions_x64.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 3 chunks +6 lines, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 3 chunks +26 lines, -14 lines 0 comments Download
M runtime/vm/stub_code.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 2 3 4 5 chunks +49 lines, -4 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 3 4 6 chunks +47 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 3 months ago (2012-09-07 11:27:37 UTC) #1
siva
lgtm https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_generator.cc#newcode1460 runtime/vm/code_generator.cc:1460: // is not a performance issue). You could ...
8 years, 3 months ago (2012-09-07 23:16:16 UTC) #2
srdjan
8 years, 3 months ago (2012-09-12 06:15:26 UTC) #3
Oops, forgot to send response.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_gen...
File runtime/vm/code_generator.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_gen...
runtime/vm/code_generator.cc:1460: // is not a performance issue).
On 2012/09/07 23:16:17, siva wrote:
> You could avoid this multiple patch by first checking if the code is alive
> right. If the code has already been marked as
> not alive it means it has already been patched.

But is is not patched at all possible return points. Two frames from two
different calls from the same code may be alive. In that case I patch the same
code twice but at different addresses.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_pat...
File runtime/vm/code_patcher_arm.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/code_pat...
runtime/vm/code_patcher_arm.cc:63: }
On 2012/09/07 23:16:17, siva wrote:
> Needs
> void CodePatcher::InsertCallAt(uword start, uword target) {
>  UNIMPLEMENTED();
> }

Done.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/dart_api...
File runtime/vm/dart_api_impl.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/dart_api...
runtime/vm/dart_api_impl.cc:3785: // Deoptimize live frames.
On 2012/09/07 23:16:17, siva wrote:
> Deoptimize all live frames?

Done.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/object.c...
runtime/vm/object.cc:6880: case PcDescriptors::kLazyDeoptJump: return "lazy     
   ";
On 2012/09/07 23:16:17, siva wrote:
> why not make it "lazy-deopt"
> would be more explicit than just "lazy"

Done.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/stub_cod...
File runtime/vm/stub_code_ia32.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/stub_cod...
runtime/vm/stub_code_ia32.cc:557: __ LeaveFrame();
On 2012/09/07 23:16:17, siva wrote:
> Could you add a comment here or above stating that the code
> above should not have any GC in it and that runtime calls
> kDeoptimizeCopyFrameRuntimeEntry and
> kDeoptimizeFillFrameEntry
> are leaf runtime calls
> 
> would make it easier when reading through the code.

Done.

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/stub_cod...
File runtime/vm/stub_code_x64.cc (right):

https://chromiumcodereview.appspot.com/10912146/diff/9002/runtime/vm/stub_cod...
runtime/vm/stub_code_x64.cc:549: __ LeaveFrame();
On 2012/09/07 23:16:17, siva wrote:
> Ditto comment regarding GC:
> 
> Could you add a comment here or above stating that the code
> above should not have any GC in it and that runtime calls
> kDeoptimizeCopyFrameRuntimeEntry and
> kDeoptimizeFillFrameEntry
> are leaf runtime calls
> 
> would make it easier when reading through the code.

Done.

Powered by Google App Engine
This is Rietveld 408576698