From 6e9e2c08292b553602c74b16b8ccff4e4ccac003 Mon Sep 17 00:00:00 2001 From: hpayer Date: Mon, 4 May 2015 06:12:25 -0700 Subject: [PATCH] New insertion write barrier. BUG= Review URL: https://codereview.chromium.org/1073953006 Cr-Commit-Position: refs/heads/master@{#28199} --- src/heap/incremental-marking-inl.h | 20 ++------------------ src/heap/spaces.h | 7 ------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/heap/incremental-marking-inl.h b/src/heap/incremental-marking-inl.h index 42b3dcb127..b9cfe1dc58 100644 --- a/src/heap/incremental-marking-inl.h +++ b/src/heap/incremental-marking-inl.h @@ -16,24 +16,8 @@ bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, Object** slot, HeapObject* value_heap_obj = HeapObject::cast(value); MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); if (Marking::IsWhite(value_bit)) { - MarkBit obj_bit = Marking::MarkBitFrom(obj); - if (Marking::IsBlack(obj_bit)) { - MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); - if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { - if (chunk->IsLeftOfProgressBar(slot)) { - WhiteToGreyAndPush(value_heap_obj, value_bit); - RestartIfNotMarking(); - } else { - return false; - } - } else { - BlackToGreyAndUnshift(obj, obj_bit); - RestartIfNotMarking(); - return false; - } - } else { - return false; - } + WhiteToGreyAndPush(value_heap_obj, value_bit); + RestartIfNotMarking(); } if (!is_compacting_) return false; MarkBit obj_bit = Marking::MarkBitFrom(obj); diff --git a/src/heap/spaces.h b/src/heap/spaces.h index e6ec542c9e..2df28c04c0 100644 --- a/src/heap/spaces.h +++ b/src/heap/spaces.h @@ -508,13 +508,6 @@ class MemoryChunk { } } - bool IsLeftOfProgressBar(Object** slot) { - Address slot_address = reinterpret_cast
(slot); - DCHECK(slot_address > this->address()); - return (slot_address - (this->address() + kObjectStartOffset)) < - progress_bar(); - } - static void IncrementLiveBytesFromGC(Address address, int by) { MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); }