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

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed)

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

Description

Move most of the incremental marking write barrier to generated code. Committed: http://code.google.com/p/v8/source/detail?r=7741

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 35

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 1

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1063 lines, -218 lines) Patch
M src/assembler.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -2 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -2 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 6 chunks +23 lines, -25 lines 0 comments Download
M src/ia32/code-stubs-ia32.h View 1 2 3 4 5 6 7 8 9 3 chunks +160 lines, -5 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 7 8 9 3 chunks +241 lines, -32 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 8 chunks +30 lines, -38 lines 0 comments Download
M src/ia32/disasm-ia32.cc View 1 2 3 4 5 6 7 8 9 5 chunks +22 lines, -6 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 9 chunks +22 lines, -12 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -4 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 9 6 chunks +109 lines, -14 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 6 chunks +108 lines, -36 lines 0 comments Download
A src/ia32/macro-assembler-ia32-inl.h View 1 2 3 4 5 6 7 8 9 1 chunk +217 lines, -0 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -4 lines 0 comments Download
M src/incremental-marking.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M src/incremental-marking.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 0 comments Download
M src/lithium-allocator.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/mark-compact.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M src/serialize.cc View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -25 lines 0 comments Download
M src/spaces.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M src/spaces.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M src/spaces-inl.h View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
M test/cctest/test-disasm-ia32.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M test/cctest/test-serialize.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
9 years, 8 months ago (2011-04-15 12:01:49 UTC) #1
Vyacheslav Egorov (Chromium)
http://codereview.chromium.org/6824078/diff/12010/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/6824078/diff/12010/src/heap.cc#newcode518 src/heap.cc:518: StackGuard::Continue(GC_REQUEST); Move to IncrementalMarking::Finalize http://codereview.chromium.org/6824078/diff/12010/src/heap.h File src/heap.h (right): http://codereview.chromium.org/6824078/diff/12010/src/heap.h#newcode815 ...
9 years, 8 months ago (2011-04-16 17:50:36 UTC) #2
Erik Corry
I also split up the monstrous RecordWriteStub::Generate function into 6 parts to make it a ...
9 years, 8 months ago (2011-04-23 17:00:11 UTC) #3
Vyacheslav Egorov (Chromium)
9 years, 8 months ago (2011-04-24 12:16:47 UTC) #4
LGTM (if it does not crash)

http://codereview.chromium.org/6824078/diff/12010/src/ia32/code-stubs-ia32.cc
File src/ia32/code-stubs-ia32.cc (right):

http://codereview.chromium.org/6824078/diff/12010/src/ia32/code-stubs-ia32.cc...
src/ia32/code-stubs-ia32.cc:6659: __ HasScanOnScavenge(object_, value_,
&scan_on_scavenge);
On 2011/04/23 17:00:11, Erik Corry wrote:
> On 2011/04/16 17:50:36, Vyacheslav Egorov wrote:
> > I think it is uber confusing that sometimes regs.object() is used and
> sometimes
> > object_ is used. Unify?
> 
> No they are not always the same register.
> 

If they are not the same it does not matter in this particular case, does it?

As far as I see from the code they should contain the same value at this point.

http://codereview.chromium.org/6824078/diff/12010/src/ia32/macro-assembler-ia...
File src/ia32/macro-assembler-ia32-inl.h (right):

http://codereview.chromium.org/6824078/diff/12010/src/ia32/macro-assembler-ia...
src/ia32/macro-assembler-ia32-inl.h:120: shl_cl(mask_scratch);
On 2011/04/23 17:00:11, Erik Corry wrote:
> On 2011/04/16 17:50:36, Vyacheslav Egorov wrote:
> > What about using bt based code for this operations?
> 
> I don't think it's a win.

I did performance measurements. I should some irrelevant improvements and some
minor regressions. Overall it was performance neutral but the code was smaller.

I don't have any strong opinion about this though.

http://codereview.chromium.org/6824078/diff/12010/src/ia32/macro-assembler-ia...
src/ia32/macro-assembler-ia32-inl.h:125: j(zero, &word_boundary);
On 2011/04/23 17:00:11, Erik Corry wrote:
> On 2011/04/16 17:50:36, Vyacheslav Egorov wrote:
> > shl(mask_scratch, 1);
> > j(carry, &word_boundary);
> > 
> > ?
> 
> At least on the p4, add is faster than shift, so that would appear to be a
> deoptimization.  
> 

Ok

http://codereview.chromium.org/6824078/diff/19007/src/ia32/code-stubs-ia32.h
File src/ia32/code-stubs-ia32.h (right):

http://codereview.chromium.org/6824078/diff/19007/src/ia32/code-stubs-ia32.h#...
src/ia32/code-stubs-ia32.h:521: regs_(NULL) {
you can just make RegisterAllocation a member of RecordWriteStub instead of
storing pointer to a stack allocated value.

the same with slow case label.

Powered by Google App Engine
This is Rietveld 408576698