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

Issue 115462: Add a script cache to the debugger... (Closed)

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

Description

Add a script cache to the debugger When loaded scripts are requested this cache is filled with all the script objects in the heap. Hereafter its content is kept in sync with the active scripts in the heap through the notifications of new scripts compiled and by using weak handles to get notified when a script is collected. Through the tracking of collected scripts the debugger event OnScriptCollected have been added to notify a debugger that a script previously returned through the scripts command is no longer in use. Make the ComputeIntegerHash globally available. Moved clearing of the mirror cache to when debugger is really left. Previously recursive invocations of the debugger cause the mirror cache to be cleared causing handles to become either stale or reference other objects. Committed: http://code.google.com/p/v8/source/detail?r=1988

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -98 lines) Patch
M include/v8-debug.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/debug.h View 7 chunks +62 lines, -4 lines 2 comments Download
M src/debug.cc View 1 11 chunks +236 lines, -21 lines 4 comments Download
M src/debug-delay.js View 2 chunks +33 lines, -1 line 0 comments Download
M src/heap.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +2 lines, -54 lines 0 comments Download
M src/utils.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/utils.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M test/cctest/test-debug.cc View 1 3 chunks +53 lines, -2 lines 0 comments Download
M test/mjsunit/debug-references.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
The main reason to postpone initialization the debugger script cache until loaded scripts are actually ...
11 years, 7 months ago (2009-05-18 12:21:39 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/115462/diff/1005/1015 File src/debug.cc (right): http://codereview.chromium.org/115462/diff/1005/1015#newcode553 Line 553: HandleScope scope; Why do you need to ...
11 years, 7 months ago (2009-05-18 12:57:00 UTC) #2
Søren Thygesen Gjesse
11 years, 7 months ago (2009-05-18 13:13:17 UTC) #3
http://codereview.chromium.org/115462/diff/1005/1015
File src/debug.cc (right):

http://codereview.chromium.org/115462/diff/1005/1015#newcode553
Line 553: HandleScope scope;
On 2009/05/18 12:57:00, Mads Ager wrote:
> Why do you need to create this handle to the script?

I don't - unused code.

http://codereview.chromium.org/115462/diff/1005/1015#newcode1570
Line 1570: // Perform GC to get unreferenced scripts evicted from the cache
before before
On 2009/05/18 12:57:00, Mads Ager wrote:
> before before -> before

Done.

http://codereview.chromium.org/115462/diff/1005/1010
File src/debug.h (right):

http://codereview.chromium.org/115462/diff/1005/1010#newcode151
Line 151: // the hash map holding the cache is the script id.
On 2009/05/18 12:57:00, Mads Ager wrote:
> I would just write "The key used in the cache is the script id."

Done.

Powered by Google App Engine
This is Rietveld 408576698