Commit 865828f3 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Forward white to grey transition only if slot is before the progress bar of a given object.

BUG=

Review URL: https://codereview.chromium.org/11415070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ec491913
......@@ -44,8 +44,12 @@ bool IncrementalMarking::BaseRecordWrite(HeapObject* obj,
if (Marking::IsBlack(obj_bit)) {
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
WhiteToGreyAndPush(value_heap_obj, value_bit);
RestartIfNotMarking();
if (chunk->IsLeftOfProgressBar(slot)) {
WhiteToGreyAndPush(value_heap_obj, value_bit);
RestartIfNotMarking();
} else {
return false;
}
} else {
BlackToGreyAndUnshift(obj, obj_bit);
RestartIfNotMarking();
......
......@@ -503,6 +503,12 @@ class MemoryChunk {
}
}
bool IsLeftOfProgressBar(Object** slot) {
Address slot_address = reinterpret_cast<Address>(slot);
ASSERT(slot_address > this->address());
return (slot_address - this->address() + kObjectStartOffset) <
progress_bar();
}
static void IncrementLiveBytesFromGC(Address address, int by) {
MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment