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

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

Issue 2853323003: [heap] Prepare IncrementalMarking::VisitObject for concurrent marking. (Closed)
Patch Set: rebase Created 3 years, 7 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/incremental-marking.h ('k') | no next file » | 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 bb2cb7f70abbebda12fa53bc94b91c24c9cd8817..902224710832e83c50cc7c65bdbd579789cf020c 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -826,12 +826,13 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() {
});
}
+bool IncrementalMarking::IsFixedArrayWithProgressBar(HeapObject* obj) {
+ if (!obj->IsFixedArray()) return false;
+ MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
+ return chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR);
+}
void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) {
- WhiteToGreyAndPush(map);
-
- IncrementalMarkingMarkingVisitor::IterateBody(map, obj);
-
#if ENABLE_SLOW_DCHECKS
MarkBit mark_bit = ObjectMarking::MarkBitFrom(obj, marking_state(obj));
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
@@ -839,7 +840,13 @@ void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) {
(chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) &&
Marking::IsBlack<kAtomicity>(mark_bit)));
#endif
- ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj));
+ if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) {
+ WhiteToGreyAndPush(map);
+ IncrementalMarkingMarkingVisitor::IterateBody(map, obj);
+ } else if (IsFixedArrayWithProgressBar(obj)) {
+ DCHECK(ObjectMarking::IsBlack<kAtomicity>(obj, marking_state(obj)));
+ IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(map, obj);
+ }
}
intptr_t IncrementalMarking::ProcessMarkingDeque(
« no previous file with comments | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698