Index: src/incremental-marking-inl.h |
diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h |
index bbe9a9d209b36cca76360b2f9b091b755dc0587a..42197df397f2042a0e40e43a565fb84c0f28d505 100644 |
--- a/src/incremental-marking-inl.h |
+++ b/src/incremental-marking-inl.h |
@@ -37,16 +37,22 @@ namespace internal { |
bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, |
Object** slot, |
Object* value) { |
- MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value)); |
+ 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)) { |
+ // TODO(hpayer): make decision based on if object has a progress bar |
Michael Starzinger
2012/11/15 18:04:26
As discussed offline, can we rebase that to the br
payer
2012/11/16 13:43:05
Done.
I will add the optimization in the next CL.
|
+ const int kLargeObjectSize = 1024 * 1024; |
+ if (Marking::IsBlack(obj_bit) && obj->Size() > kLargeObjectSize) { |
+ WhiteToGreyAndPush(value_heap_obj, value_bit); |
+ RestartIfNotMarking(); |
+ } else if (Marking::IsBlack(obj_bit)) { |
Michael Starzinger
2012/11/15 18:04:26
Can we rewrite the condition so that it does the M
payer
2012/11/16 13:43:05
Done.
|
BlackToGreyAndUnshift(obj, obj_bit); |
RestartIfNotMarking(); |
+ return false; |
+ } else |
+ return false; |
} |
- |
- // Object is either grey or white. It will be scanned if survives. |
- return false; |
} |
if (!is_compacting_) return false; |
MarkBit obj_bit = Marking::MarkBitFrom(obj); |