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

Issue 7104107: Incremental mode now works for x64. The only difference (Closed)

Created:
9 years, 6 months ago by Erik Corry
Modified:
9 years, 6 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Incremental mode now works for x64. The only difference between IA32 and x64 is now that in IA32 we can mark pointer-free objects black without going into runtime code. Also fixed a bug where spaces with heightened alignment requirements could get messed up by the free-list chopping that was implemented to get timely marking increments. Committed: http://code.google.com/p/v8/source/detail?r=8270

Patch Set 1 #

Total comments: 32
Unified diffs Side-by-side diffs Delta from patch set Stats (+477 lines, -124 lines) Patch
M src/arm/code-stubs-arm.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 chunk +2 lines, -0 lines 2 comments Download
M src/arm/macro-assembler-arm.h View 3 chunks +23 lines, -13 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +19 lines, -0 lines 8 comments Download
M src/flag-definitions.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/heap.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.h View 2 chunks +24 lines, -9 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/mark-compact.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/spaces.h View 4 chunks +26 lines, -0 lines 6 comments Download
M src/spaces.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/x64/code-stubs-x64.h View 2 chunks +14 lines, -24 lines 4 comments Download
M src/x64/code-stubs-x64.cc View 3 chunks +101 lines, -30 lines 2 comments Download
M src/x64/full-codegen-x64.cc View 2 chunks +11 lines, -3 lines 2 comments Download
M src/x64/lithium-codegen-x64.cc View 2 chunks +1 line, -1 line 0 comments Download
M src/x64/macro-assembler-x64.h View 3 chunks +57 lines, -8 lines 6 comments Download
M src/x64/macro-assembler-x64.cc View 8 chunks +126 lines, -8 lines 2 comments Download
M src/x64/stub-cache-x64.cc View 5 chunks +29 lines, -7 lines 0 comments Download
M test/cctest/test-serialize.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
9 years, 6 months ago (2011-06-10 12:56:24 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/7104107/diff/1/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): http://codereview.chromium.org/7104107/diff/1/src/arm/full-codegen-arm.cc#newcode3279 src/arm/full-codegen-arm.cc:3279: // so we don't call the stub that ...
9 years, 6 months ago (2011-06-10 13:55:44 UTC) #2
Erik Corry
9 years, 6 months ago (2011-06-10 21:57:29 UTC) #3
http://codereview.chromium.org/7104107/diff/1/src/arm/full-codegen-arm.cc
File src/arm/full-codegen-arm.cc (right):

http://codereview.chromium.org/7104107/diff/1/src/arm/full-codegen-arm.cc#new...
src/arm/full-codegen-arm.cc:3279: // so we don't call the stub that handles
this.
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> More explanation (e.g. that the incremental marker is never in the middle of a
> FixedArray).

Done.

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

http://codereview.chromium.org/7104107/diff/1/src/arm/macro-assembler-arm.cc#...
src/arm/macro-assembler-arm.cc:3169: void MacroAssembler::IsDataObject(Register
value,
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> JumpIfNotDataObject

Done.

http://codereview.chromium.org/7104107/diff/1/src/arm/macro-assembler-arm.cc#...
src/arm/macro-assembler-arm.cc:3171: Label* not_data_object) {
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Should it have a distance too?

No, ARM has fixed width instructions.

http://codereview.chromium.org/7104107/diff/1/src/arm/macro-assembler-arm.cc#...
src/arm/macro-assembler-arm.cc:3182: // Jump if we need to mark it grey and push
it.
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Comment not related to function name or description.

Deleted.

http://codereview.chromium.org/7104107/diff/1/src/arm/macro-assembler-arm.cc#...
src/arm/macro-assembler-arm.cc:3184: bind(&is_data_object);
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> This detects only HeapNumber and non-cons String.
> It seems there are other data objects (Oddballs), but I guess they are
> irrelevant because they are always in old-space?
> I.e., add comment saying why.

Done.

http://codereview.chromium.org/7104107/diff/1/src/spaces.h
File src/spaces.h (right):

http://codereview.chromium.org/7104107/diff/1/src/spaces.h#newcode170
src/spaces.h:170: static const uint32_t kBitsPerCell = 32;
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> kBitsPerInt ?

Not really.

http://codereview.chromium.org/7104107/diff/1/src/spaces.h#newcode173
src/spaces.h:173: static const uint32_t kBytesPerCell = kBitsPerCell / 8;
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> 8 -> kBitsPerByte

Done.

http://codereview.chromium.org/7104107/diff/1/src/spaces.h#newcode174
src/spaces.h:174: static const uint32_t kBytesPerCellLog2 = kBitsPerCellLog2 -
3;
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> 3 -> kBitesPerByteLog2

Done.

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:5235: if (save_address) __ push(regs_.address());
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Put braces around then-block.
> Don't trust that __ is a single expression macro (it could be doing coverage
> analysis at some point again).

Done.

> Is there no spare register to use instead of the stack?

Changed to use arg3.

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.h
File src/x64/code-stubs-x64.h (left):

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.h#oldcod...
src/x64/code-stubs-x64.h:650: void SaveCallerSaveRegisters(MacroAssembler* masm,
SaveFPRegsMode mode) {
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Is this the C+-calling convention saved registers, or just internal ones.
> If the former, the XMM registers differ beetween Win64 ABI and X64 ABI (but
> pushing them all is obviously safe).

It's a conservative estimate of the intersection of the caller-save registers in
V8 and the caller save registers in C++.

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.h
File src/x64/code-stubs-x64.h (right):

http://codereview.chromium.org/7104107/diff/1/src/x64/code-stubs-x64.h#newcod...
src/x64/code-stubs-x64.h:694: kRememberedSetOnNoNeedToInformIncrementalMarker
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Do what to remembered set on no need to inform incremental marker?

Update.

http://codereview.chromium.org/7104107/diff/1/src/x64/full-codegen-x64.cc
File src/x64/full-codegen-x64.cc (right):

http://codereview.chromium.org/7104107/diff/1/src/x64/full-codegen-x64.cc#new...
src/x64/full-codegen-x64.cc:3156: // (or them and test against Smi mask.)
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Use JumpIf[Not]BothSmi in X64.

JumpIfBothSmi doesn't exist.  I'll do this if I see evidence that it makes any
difference.

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

http://codereview.chromium.org/7104107/diff/1/src/x64/macro-assembler-x64.cc#...
src/x64/macro-assembler-x64.cc:3864: // Note that we are using a 4-byte aligned
8-byte load.
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> Badness. If it also overlaps a cache boundary, it can be pretty expensive.

 Lets see.  The alternative, on IA32 is a mispredicted branch.

http://codereview.chromium.org/7104107/diff/1/src/x64/macro-assembler-x64.h
File src/x64/macro-assembler-x64.h (right):

http://codereview.chromium.org/7104107/diff/1/src/x64/macro-assembler-x64.h#n...
src/x64/macro-assembler-x64.h:195: // Check if an object has the black
incremental marking color.  Also uses ecx!
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> ecx->rcx (if still true - I assume it's for shifting).

Done.

http://codereview.chromium.org/7104107/diff/1/src/x64/macro-assembler-x64.h#n...
src/x64/macro-assembler-x64.h:196: void IsBlack(Register object,
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> IsBlack -> JumpIfBlack

Done.

http://codereview.chromium.org/7104107/diff/1/src/x64/macro-assembler-x64.h#n...
src/x64/macro-assembler-x64.h:199: Label* is_black,
On 2011/06/10 13:55:44, Lasse Reichstein wrote:
> is_black -> on_black

Done.

Powered by Google App Engine
This is Rietveld 408576698