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

Issue 7212025: Add support for lazy deoptimization from deferred stack checks (Closed)

Created:
9 years, 5 months ago by Søren Thygesen Gjesse
Modified:
9 years, 5 months ago
CC:
v8-dev, Rico
Visibility:
Public.

Description

Add support for lazy deoptimization from deferred stack checks The debugger can be entered from the deferred stack check in optimized code. This can cause both lazy deoptimization and debugger deoptimization (setting the first break point and inspecting the stack for optimized code respectively). This required deoptimization support from the deferred stack check. The lazy deoptimiztion call is inserted when the deferred code is done including restoring the registers. The bailout to the full code is the begining of the loop body as that is where the stack check is sitting in the optimized code. The bailout is not to the stack check in the full code as that is sitting at the end of the loop. R=kmillikin@chromium.org BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8535

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -44 lines) Patch
M src/arm/lithium-codegen-arm.cc View 2 chunks +32 lines, -7 lines 0 comments Download
M src/ast.h View 5 chunks +5 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.cc View 4 chunks +6 lines, -5 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 2 chunks +33 lines, -7 lines 1 comment Download
M src/x64/lithium-codegen-x64.cc View 2 chunks +38 lines, -7 lines 0 comments Download
M test/cctest/test-debug.cc View 5 chunks +54 lines, -17 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
9 years, 5 months ago (2011-07-05 12:52:19 UTC) #1
Kevin Millikin (Chromium)
LGTM.
9 years, 5 months ago (2011-07-05 13:09:42 UTC) #2
sra1
9 years, 5 months ago (2011-07-06 03:59:09 UTC) #3
http://codereview.chromium.org/7212025/diff/1/src/ia32/lithium-codegen-ia32.cc
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/7212025/diff/1/src/ia32/lithium-codegen-ia32.c...
src/ia32/lithium-codegen-ia32.cc:273: // have room for lazy bailout.
I don't understand why the last piece of deferred code is special in the need
for some room for lazy bailout.  Is the last piece special?  If it is special,
this seems fragile.  Perhaps in the future the deferred code fragments get
sorted in some way, e.g. to optimize the number of exit jumps that can be in the
short form.  If the last piece of code is always a certain kind of deferred
code, the deferred code Generate method should allocate the nops.

Please take a look at http://codereview.chromium.org/7277081/.
This change invalidates your assumption that the deferred code ends in a jump to
the exit label.
You can still make the deferred stack check end with a jump but please don't
force that constraint on other deferred code fragments.  The constraint is
adding 2-3% extra code size.

Powered by Google App Engine
This is Rietveld 408576698