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

Issue 6713075: Create an abstraction (MarkBit) object to hold the location of the... (Closed)

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

Description

Create an abstraction (MarkBit) object to hold the location of the mark bits for an object. This allows the compiler to avoid recalculating the location when accessing two bits for incremental marking or when testing and then setting mark bits. Committed: http://code.google.com/p/v8/source/detail?r=7295

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -236 lines) Patch
M src/heap.h View 3 chunks +4 lines, -2 lines 2 comments Download
M src/incremental-marking.h View 1 2 chunks +48 lines, -35 lines 0 comments Download
M src/incremental-marking.cc View 5 chunks +23 lines, -15 lines 0 comments Download
M src/mark-compact.h View 4 chunks +26 lines, -46 lines 0 comments Download
M src/mark-compact.cc View 1 32 chunks +133 lines, -82 lines 4 comments Download
M src/objects.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime-profiler.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/spaces.h View 1 5 chunks +50 lines, -52 lines 2 comments Download
M src/spaces.cc View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
9 years, 9 months ago (2011-03-21 16:41:37 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM http://codereview.chromium.org/6713075/diff/3002/src/heap.h File src/heap.h (right): http://codereview.chromium.org/6713075/diff/3002/src/heap.h#newcode1788 src/heap.h:1788: ASSERT(object->IsHeapObject()); Do we really want this? Sometimes it's ...
9 years, 9 months ago (2011-03-21 16:54:23 UTC) #2
Vyacheslav Egorov (Chromium)
additional comments. http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc File src/mark-compact.cc (right): http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc#newcode246 src/mark-compact.cc:246: IncrementalMarking::MarkBlack(old_mark_bit); new_mark_bit http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc#newcode958 src/mark-compact.cc:958: Code* inlined_code = ...
9 years, 9 months ago (2011-03-21 17:16:30 UTC) #3
Erik Corry
9 years, 9 months ago (2011-03-21 20:48:53 UTC) #4
http://codereview.chromium.org/6713075/diff/3002/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/6713075/diff/3002/src/heap.h#newcode1788
src/heap.h:1788: ASSERT(object->IsHeapObject());
On 2011/03/21 16:54:23, Vyacheslav Egorov wrote:
> Do we really want this?
> 
> Sometimes it's better to have an early detection of mark stack corruption.

This is inlined in some of our hottest GC functions.  I'm going to follow the
pattern in the entire rest of the VM and leave sanity tests to the debug
version.

http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc
File src/mark-compact.cc (right):

http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc#newcode246
src/mark-compact.cc:246: IncrementalMarking::MarkBlack(old_mark_bit);
On 2011/03/21 17:16:30, Vyacheslav Egorov wrote:
> new_mark_bit

Good catch.

http://codereview.chromium.org/6713075/diff/3002/src/mark-compact.cc#newcode958
src/mark-compact.cc:958: Code* inlined_code =
inlined->unchecked_shared()->unchecked_code();
On 2011/03/21 17:16:30, Vyacheslav Egorov wrote:
> I think we will need to kill all unchecked_* getters.
> 
> add TODO(gc) for that.

Done.

http://codereview.chromium.org/6713075/diff/3002/src/spaces.h
File src/spaces.h (right):

http://codereview.chromium.org/6713075/diff/3002/src/spaces.h#newcode121
src/spaces.h:121: class MarkBit {
On 2011/03/21 16:54:23, Vyacheslav Egorov wrote:
> // TODO(gc) ensure all operations inlined and object is exploded by compiler
on
> all platforms.

Checked on gcc/x86.

TODO added.

>

Powered by Google App Engine
This is Rietveld 408576698