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

Issue 2943002: Reimplement stack manipulations for LiveEdit (Closed)

Created:
10 years, 5 months ago by Peter Rybin
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reimplement stack manipulations for LiveEdit Overview: When function gets updated with a new code, it may stay activated on stack and have to be restarted. The code of the function is additionally patched with a 'restarter' code snippet and PC is set there. All scope analyzers must realize that there are no local variables in this state.

Patch Set 1 #

Patch Set 2 : docs #

Patch Set 3 : clean #

Patch Set 4 : presubmit #

Patch Set 5 : fix 'with' scope #

Total comments: 33

Patch Set 6 : follow codereview #

Unified diffs Side-by-side diffs Delta from patch set Stats (+697 lines, -394 lines) Patch
M src/arm/debug-arm.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M src/builtins.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/builtins.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/debug.h View 1 2 7 chunks +47 lines, -5 lines 0 comments Download
M src/debug.cc View 1 2 3 3 chunks +15 lines, -4 lines 0 comments Download
M src/factory.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/factory.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M src/frames.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/frames.cc View 1 2 3 4 4 chunks +28 lines, -1 line 0 comments Download
M src/heap.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/heap.cc View 1 2 3 4 chunks +13 lines, -15 lines 0 comments Download
M src/ia32/debug-ia32.cc View 1 2 3 4 5 2 chunks +23 lines, -27 lines 0 comments Download
M src/liveedit.h View 1 2 3 4 5 3 chunks +23 lines, -18 lines 0 comments Download
M src/liveedit.cc View 1 2 3 4 5 16 chunks +357 lines, -162 lines 0 comments Download
M src/liveedit-debugger.js View 1 2 3 4 5 4 chunks +108 lines, -116 lines 0 comments Download
M src/mips/debug-mips.cc View 1 chunk +4 lines, -6 lines 0 comments Download
M src/profile-generator.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 8 chunks +33 lines, -12 lines 0 comments Download
M src/scopeinfo.h View 1 2 3 4 5 3 chunks +15 lines, -3 lines 0 comments Download
M src/scopeinfo.cc View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M src/x64/debug-x64.cc View 1 chunk +3 lines, -6 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Peter Rybin
Hi Mads Can I ask you to take a look at this CL. Soren is ...
10 years, 5 months ago (2010-07-13 00:45:19 UTC) #1
Mads Ager (chromium)
Initial set of comments. I don't understand the messing with the context of the restarted ...
10 years, 5 months ago (2010-07-15 13:09:04 UTC) #2
Peter Rybin
http://codereview.chromium.org/2943002/diff/8001/9012 File src/ia32/debug-ia32.cc (right): http://codereview.chromium.org/2943002/diff/8001/9012#newcode275 src/ia32/debug-ia32.cc:275: // However height the frame was, reset the stack ...
10 years, 5 months ago (2010-07-15 18:51:57 UTC) #3
Mads Ager (chromium)
10 years, 5 months ago (2010-07-16 09:32:53 UTC) #4
Thanks for your explanations! :)

I still don't like the debugger ever seeing this temporary state. We should be
able to generate some sort of one-shot breakpoint in the beginning of the
function and then restart the function. When we hit the one-shot breakpoint in
the beginning of the function we have all the scope information and can remove
the one-shot breakpoint. I think this will be a better experience for the user
as well. The stack will be changed and the function restarted but he will be
able to see everything as expected. 

I don't like changing the scope info to deal with this artificial state (not
worried about performance, but we really shouldn't have to look at scope info in
this state at all). We should get out of that state immediately instead and find
a way to have the debugger break immediately on entry to the restarted function.

http://codereview.chromium.org/2943002/diff/8001/9014
File src/liveedit.cc (right):

http://codereview.chromium.org/2943002/diff/8001/9014#newcode1329
src/liveedit.cc:1329: // If function was in some nested scope (e.g. 'with'),
reset it back to
On 2010/07/15 18:51:57, Peter Rybin wrote:
> On 2010/07/15 13:09:04, Mads Ager wrote:
> > Why would you want to do that? That makes no sense to me. The function is
> still
> > in the same context.
> 
> As I understand that pointer to context (ebp - 1) gets temporary updated when
> function enters info 'with' statement. Now that we are restarting the frame,
we
> need the original context both for running and (I think) for stack analyzer.

Ah! Sorry about that, I misread this as messing with the context of a function.
Not with the context in the frame. I understand what you are doing now, thanks.

Powered by Google App Engine
This is Rietveld 408576698