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

Unified Diff: src/heap/incremental-marking.cc

Issue 2731363002: [heap] Do not clear mark bits of left trimmed old object start. (Closed)
Patch Set: comment fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 437cf12b256d510586a5daaf4c3806024e154987..ce925491b4dc3b6dd3c5ead643c73baf75233132 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -138,25 +138,13 @@ void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from,
MarkBit new_mark_bit = ObjectMarking::MarkBitFrom(to);
MarkBit old_mark_bit = ObjectMarking::MarkBitFrom(from);
-#ifdef DEBUG
- Marking::ObjectColor old_color = Marking::Color(old_mark_bit);
-#endif
-
if (Marking::IsBlack(old_mark_bit)) {
- Marking::MarkWhite(old_mark_bit);
- Marking::WhiteToBlack(new_mark_bit);
- return;
+ Marking::MarkBlack(new_mark_bit);
} else if (Marking::IsGrey(old_mark_bit)) {
- Marking::MarkWhite(old_mark_bit);
- Marking::WhiteToGrey(new_mark_bit);
+ Marking::MarkGrey(new_mark_bit);
heap->mark_compact_collector()->marking_deque()->Push(to);
heap->incremental_marking()->RestartIfNotMarking();
}
-
-#ifdef DEBUG
- Marking::ObjectColor new_color = Marking::Color(new_mark_bit);
- DCHECK(new_color == old_color);
-#endif
}
class IncrementalMarkingMarkingVisitor
@@ -835,10 +823,10 @@ intptr_t IncrementalMarking::ProcessMarkingDeque(
completion == FORCE_COMPLETION)) {
HeapObject* obj = marking_deque->Pop();
- // Left trimming may result in white filler objects on the marking deque.
- // Ignore these objects.
+ // Left trimming may result in white, grey, or black filler objects on the
+ // marking deque. Ignore these objects.
if (obj->IsFiller()) {
- DCHECK(ObjectMarking::IsImpossible(obj) || ObjectMarking::IsWhite(obj));
+ DCHECK(!ObjectMarking::IsImpossible(obj));
continue;
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698