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

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

Issue 2863933002: [heap] Reland "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 aa37d6011db022e4dca1154ba5f1fad21fc5bbed..e5c65705c9726b7245eb3361af4566df77e68c20 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -835,12 +835,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());
@@ -848,7 +849,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