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

Issue 6794052: Combine the incremental-marking write barrier and the remembered-set... (Closed)

Created:
9 years, 8 months ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Combine the incremental-marking write barrier and the remembered-set write barrier into one stub. Committed: http://code.google.com/p/v8/source/detail?r=7514

Patch Set 1 #

Total comments: 15

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -182 lines) Patch
M src/code-stubs.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 chunks +13 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.h View 1 2 chunks +28 lines, -27 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 1 chunk +30 lines, -11 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 chunks +17 lines, -6 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 3 chunks +7 lines, -10 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 3 chunks +11 lines, -21 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 8 chunks +38 lines, -76 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 5 chunks +16 lines, -25 lines 0 comments Download
M src/incremental-marking.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
9 years, 8 months ago (2011-04-05 15:20:49 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM with comments addressed http://codereview.chromium.org/6794052/diff/1/src/ia32/code-stubs-ia32.cc File src/ia32/code-stubs-ia32.cc (right): http://codereview.chromium.org/6794052/diff/1/src/ia32/code-stubs-ia32.cc#newcode6476 src/ia32/code-stubs-ia32.cc:6476: // the object we are ...
9 years, 8 months ago (2011-04-06 11:46:40 UTC) #2
Erik Corry
9 years, 8 months ago (2011-04-06 12:31:28 UTC) #3
http://codereview.chromium.org/6794052/diff/1/src/ia32/code-stubs-ia32.cc
File src/ia32/code-stubs-ia32.cc (right):

http://codereview.chromium.org/6794052/diff/1/src/ia32/code-stubs-ia32.cc#new...
src/ia32/code-stubs-ia32.cc:6476: // the object we are writing into in the
'address' register.  We insert a
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> we have the object in the object register.
> I guess we have something different in the address register. Like slot offset.

Done.

http://codereview.chromium.org/6794052/diff/1/src/ia32/codegen-ia32.cc
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/6794052/diff/1/src/ia32/codegen-ia32.cc#newcod...
src/ia32/codegen-ia32.cc:9798: __ RememberedSetHelper(receiver.reg(),
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> this place should have an incremental write barrier. why did you remove it?

This whole file is on death row.  Comment added.  You will note that I did not
remove it in this change.

http://codereview.chromium.org/6794052/diff/1/src/ia32/lithium-codegen-ia32.cc
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/6794052/diff/1/src/ia32/lithium-codegen-ia32.c...
src/ia32/lithium-codegen-ia32.cc:2056: __ RecordWrite(object, address, value,
OMIT_REMEMBERED_SET, kSaveFPRegs);
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> mixing two constant naming styles in a single call. maybe we should choose
one?

Yes.  Postponed.

http://codereview.chromium.org/6794052/diff/1/src/ia32/macro-assembler-ia32.cc
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/6794052/diff/1/src/ia32/macro-assembler-ia32.c...
src/ia32/macro-assembler-ia32.cc:67: preserve[object.code()] = true;
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> Is there any particular reason for modes removal? This will probably make call
> prologue bigger in some cases.

We can't splat the registers if they are going to be used later for the
remembered set write barrier.  This will be further rationalized in the next
change.

http://codereview.chromium.org/6794052/diff/1/src/ia32/macro-assembler-ia32.c...
src/ia32/macro-assembler-ia32.cc:176: if (emit_remembered_set ==
OMIT_REMEMBERED_SET &&
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> Maybe add an assertion that during snapshot generation we don't omit any write
> barriers.

We omit the remembered set when writing into global variable cells.  These are
always scanned.  We can do this when generating snapshots too.

http://codereview.chromium.org/6794052/diff/1/src/ia32/stub-cache-ia32.cc
File src/ia32/stub-cache-ia32.cc (right):

http://codereview.chromium.org/6794052/diff/1/src/ia32/stub-cache-ia32.cc#new...
src/ia32/stub-cache-ia32.cc:1502: EMIT_REMEMBERED_SET, kDontSaveFPRegs,
OMIT_SMI_CHECK);
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> strange formatting

Done.

http://codereview.chromium.org/6794052/diff/1/src/ia32/stub-cache-ia32.cc#new...
src/ia32/stub-cache-ia32.cc:1545: // write too.
On 2011/04/06 11:46:40, Vyacheslav Egorov wrote:
> this was not a record write for hole, it's record write for a value we push on
> line 1535 

Oops.  Nice catch.  Fixed.  And comment added.  This a tricky bit of code.

Powered by Google App Engine
This is Rietveld 408576698