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

Issue 2101002: Cardmarking writebarrier. (Closed)

Created:
10 years, 7 months ago by Vyacheslav Egorov (Chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

- Changes to enable oldspaces iteration without maps decoding: -- layout change for FixedArrays: length is stored as a smis (initial patch by Kevin Millikin) -- layout change for SharedFunctionInfo: integer fields are stored as smi on arm, ia32 and rearranged on x64. -- layout change for String: meaning of LSB bit is fliped (1 now means hash not computed); on x64 padding is added. -- layout of maps is _not_ changed. Map space is currently iterated in a special way. - Cardmarking write barrier. New barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code). Committed: http://code.google.com/p/v8/source/detail?r=4685

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 114

Patch Set 3 : addressed review comments #

Patch Set 4 : added more comments #

Total comments: 11

Patch Set 5 : fixed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1592 lines, -1608 lines) Patch
M src/arm/builtins-arm.cc View 12 chunks +24 lines, -21 lines 0 comments Download
M src/arm/codegen-arm.cc View 9 chunks +10 lines, -11 lines 0 comments Download
M src/arm/ic-arm.cc View 1 2 11 chunks +22 lines, -18 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 3 4 1 chunk +6 lines, -8 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 chunks +13 lines, -54 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/globals.h View 1 2 2 chunks +4 lines, -5 lines 0 comments Download
M src/heap.h View 1 2 3 4 8 chunks +74 lines, -39 lines 0 comments Download
M src/heap.cc View 1 2 3 4 25 chunks +357 lines, -228 lines 0 comments Download
M src/heap-inl.h View 1 2 5 chunks +48 lines, -8 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 4 chunks +12 lines, -11 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 chunk +0 lines, -36 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 14 chunks +18 lines, -34 lines 0 comments Download
M src/ia32/ic-ia32.cc View 7 chunks +17 lines, -17 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 chunks +23 lines, -83 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 4 chunks +6 lines, -8 lines 0 comments Download
M src/mark-compact.h View 1 2 7 chunks +25 lines, -37 lines 0 comments Download
M src/mark-compact.cc View 1 2 31 chunks +102 lines, -101 lines 0 comments Download
M src/objects.h View 1 2 23 chunks +134 lines, -79 lines 0 comments Download
M src/objects.cc View 1 8 chunks +8 lines, -11 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 12 chunks +85 lines, -25 lines 0 comments Download
M src/runtime.cc View 13 chunks +18 lines, -16 lines 0 comments Download
M src/spaces.h View 1 2 22 chunks +156 lines, -124 lines 0 comments Download
M src/spaces.cc View 1 2 3 32 chunks +108 lines, -305 lines 0 comments Download
M src/spaces-inl.h View 1 2 2 chunks +139 lines, -74 lines 0 comments Download
M src/x64/builtins-x64.cc View 6 chunks +22 lines, -22 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 15 chunks +37 lines, -52 lines 0 comments Download
M src/x64/ic-x64.cc View 10 chunks +28 lines, -32 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 5 chunks +15 lines, -4 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 8 chunks +50 lines, -97 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 4 chunks +7 lines, -8 lines 0 comments Download
M test/cctest/test-heap.cc View 1 2 6 chunks +9 lines, -17 lines 0 comments Download
M test/cctest/test-spaces.cc View 2 chunks +7 lines, -15 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Vyacheslav Egorov (Chromium)
10 years, 7 months ago (2010-05-14 14:27:40 UTC) #1
Kasper Lund
Quick comment: http://codereview.chromium.org/2101002/diff/2001/3015 File src/ia32/macro-assembler-ia32.cc (right): http://codereview.chromium.org/2101002/diff/2001/3015#newcode67 src/ia32/macro-assembler-ia32.cc:67: bts(Operand(scratch), addr); Can't you use: bts(Operand(object, Page::kDirtyFlagOffset), ...
10 years, 7 months ago (2010-05-17 10:38:24 UTC) #2
Mads Ager (chromium)
Large change. First batch of comments. :) http://codereview.chromium.org/2101002/diff/2001/3003 File src/arm/ic-arm.cc (right): http://codereview.chromium.org/2101002/diff/2001/3003#newcode768 src/arm/ic-arm.cc:768: // r2: ...
10 years, 7 months ago (2010-05-17 14:18:39 UTC) #3
Vyacheslav Egorov (Chromium)
http://codereview.chromium.org/2101002/diff/2001/3008 File src/heap-inl.h (right): http://codereview.chromium.org/2101002/diff/2001/3008#newcode280 src/heap-inl.h:280: Object** src_object_p = reinterpret_cast<Object**>(src); On 2010/05/17 14:18:39, Mads Ager ...
10 years, 7 months ago (2010-05-17 15:01:35 UTC) #4
antonm
drive-by comments http://codereview.chromium.org/2101002/diff/2001/3009 File src/heap.cc (right): http://codereview.chromium.org/2101002/diff/2001/3009#newcode3374 src/heap.cc:3374: Object** object_p = reinterpret_cast<Object**>(object_address); do not you ...
10 years, 7 months ago (2010-05-17 15:14:23 UTC) #5
Vyacheslav Egorov (Chromium)
Thanks for your comments, Anton! This change is large and employs some dirty tricks so ...
10 years, 7 months ago (2010-05-17 15:37:01 UTC) #6
antonm
http://codereview.chromium.org/2101002/diff/2001/3009 File src/heap.cc (right): http://codereview.chromium.org/2101002/diff/2001/3009#newcode3389 src/heap.cc:3389: return page + (((addr - page) + (Map::kSize - ...
10 years, 7 months ago (2010-05-17 15:40:34 UTC) #7
iposva
In the future it might make sense to break changes like these into smaller pieces. ...
10 years, 7 months ago (2010-05-17 17:48:52 UTC) #8
Mads Ager (chromium)
This looks great! A few more comments for you. http://codereview.chromium.org/2101002/diff/2001/3009 File src/heap.cc (right): http://codereview.chromium.org/2101002/diff/2001/3009#newcode3572 src/heap.cc:3572: ...
10 years, 7 months ago (2010-05-18 08:28:50 UTC) #9
Vyacheslav Egorov (Chromium)
http://codereview.chromium.org/2101002/diff/2001/3023 File src/objects.h (left): http://codereview.chromium.org/2101002/diff/2001/3023#oldcode58 src/objects.h:58: // - Array On 2010/05/18 08:28:50, Mads Ager wrote: ...
10 years, 7 months ago (2010-05-18 08:39:50 UTC) #10
Vyacheslav Egorov (Chromium)
I addressed comments about comments by adding more comments. :) http://codereview.chromium.org/2101002/diff/2001/3003 File src/arm/ic-arm.cc (right): http://codereview.chromium.org/2101002/diff/2001/3003#newcode768 ...
10 years, 7 months ago (2010-05-19 11:50:57 UTC) #11
Mads Ager (chromium)
10 years, 7 months ago (2010-05-20 11:19:08 UTC) #12
LGTM!

http://codereview.chromium.org/2101002/diff/26001/27005
File src/arm/macro-assembler-arm.h (right):

http://codereview.chromium.org/2101002/diff/26001/27005#newcode117
src/arm/macro-assembler-arm.h:117: // For page containing |object| mark region
covering [object+offset] dirty.
page -> the page
region -> the region

http://codereview.chromium.org/2101002/diff/26001/27005#newcode120
src/arm/macro-assembler-arm.h:120: // For page containing |object| mark region
covering [object+offset] dirty.
page -> the page
region -> the region

http://codereview.chromium.org/2101002/diff/26001/27005#newcode121
src/arm/macro-assembler-arm.h:121: // Object address must be in the first 8K of
an allocated page.
The object address

http://codereview.chromium.org/2101002/diff/26001/27006
File src/builtins.cc (right):

http://codereview.chromium.org/2101002/diff/26001/27006#newcode308
src/builtins.cc:308: // region dirty marks.
There is a mix of 'page dirty marks' and 'region dirty marks' in these comments.
Choose one?

http://codereview.chromium.org/2101002/diff/26001/27010
File src/heap.cc (right):

http://codereview.chromium.org/2101002/diff/26001/27010#newcode823
src/heap.cc:823: // allocation to avoid overheads. So to maintain watermark
invariant
overheads -> overhead
watermark invariant -> the watermark invariant

http://codereview.chromium.org/2101002/diff/26001/27010#newcode824
src/heap.cc:824: // we have to manually cache watermark and mark page as having
invalid
the watermark
the page
an invalid

http://codereview.chromium.org/2101002/diff/26001/27010#newcode3537
src/heap.cc:3537: region_end   = region_start + Page::kRegionSize;
Remove extra indentation.

http://codereview.chromium.org/2101002/diff/26001/27010#newcode3547
src/heap.cc:3547: region_end   = region_start + Page::kRegionSize;
Ditto.

http://codereview.chromium.org/2101002/diff/26001/27010#newcode3549
src/heap.cc:3549: mask  <<= 1;
Two spaces before <<=

http://codereview.chromium.org/2101002/diff/26001/27011
File src/heap.h (right):

http://codereview.chromium.org/2101002/diff/26001/27011#newcode1331
src/heap.h:1331: // Visitor class to verify interior pointers in spaces that
does not contain
does -> do

http://codereview.chromium.org/2101002/diff/26001/27016
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/2101002/diff/26001/27016#newcode132
src/ia32/macro-assembler-ia32.cc:132: // array access: calculate the destination
address in the same manner as
array -> Array

Powered by Google App Engine
This is Rietveld 408576698