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

Issue 7054072: Refactor storage of global handles. (Closed)

Created:
9 years, 6 months ago by Vitaly Repeshko
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Refactor storage of global handles. We used to have a linked list of nodes that were internally block-allocated. I kept the node blocks and put them on two lists: 1) the list of all allocated blocks, 2) the list of blocks with used nodes. (1) is used to reclaim blocks and (2) is used for traversal during GC. To make traversal on scavenges faster the nodes holding new space objects are grouped in an auxiliary array. This changes the minimal memory usage from 5 words per global handle to 4. Additional word is used for new space handles. Committed: http://code.google.com/p/v8/source/detail?r=8186

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -341 lines) Patch
M src/api.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/global-handles.h View 5 chunks +18 lines, -30 lines 2 comments Download
M src/global-handles.cc View 16 chunks +361 lines, -305 lines 4 comments Download
M src/heap.h View 1 chunk +1 line, -1 line 0 comments Download
M src/heap.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/utils.h View 1 chunk +2 lines, -0 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Vitaly Repeshko
Slava, This is a cleaned up version of my earlier draft. The only important change ...
9 years, 6 months ago (2011-06-06 12:42:09 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM! http://codereview.chromium.org/7054072/diff/1/src/global-handles.cc File src/global-handles.cc (right): http://codereview.chromium.org/7054072/diff/1/src/global-handles.cc#newcode66 src/global-handles.cc:66: // TODO(bug!): if it's a weak handle we ...
9 years, 6 months ago (2011-06-06 12:59:22 UTC) #2
Vitaly Repeshko
Thanks! Submitted. http://codereview.chromium.org/7054072/diff/1/src/global-handles.cc File src/global-handles.cc (right): http://codereview.chromium.org/7054072/diff/1/src/global-handles.cc#newcode66 src/global-handles.cc:66: // TODO(bug!): if it's a weak handle ...
9 years, 6 months ago (2011-06-06 15:19:43 UTC) #3
antonm
9 years, 6 months ago (2011-06-06 15:44:40 UTC) #4
DBC

http://codereview.chromium.org/7054072/diff/1/src/global-handles.h
File src/global-handles.h (right):

http://codereview.chromium.org/7054072/diff/1/src/global-handles.h#newcode165
src/global-handles.h:165: // Iterates over all strong and dependent handles.
nit: comment requires an update

http://codereview.chromium.org/7054072/diff/1/src/global-handles.h#newcode177
src/global-handles.h:177: // Iterates over all weak independent roots in heap.
ditto

Powered by Google App Engine
This is Rietveld 408576698