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

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

Issue 2855143003: [heap] Minor MC: Implement page moving (Closed)
Patch Set: Disable flag 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/heap.cc ('k') | src/heap/mark-compact.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 e5c65705c9726b7245eb3361af4566df77e68c20..abd6f7c47c2d5aa61304417e35128dc57f60e0cc 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -821,7 +821,23 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() {
(obj->IsFiller() &&
ObjectMarking::IsWhite<kAtomicity>(obj, marking_state(obj))));
return dest;
+ } else if (heap_->InToSpace(obj)) {
+ // The object may be on a page that was moved in new space.
+ DCHECK(
+ Page::FromAddress(obj->address())->IsFlagSet(Page::SWEEP_TO_ITERATE));
+ return ObjectMarking::IsBlack<kAtomicity>(obj,
+ MarkingState::External(obj))
+ ? obj
+ : nullptr;
} else {
+ // The object may be on a page that was moved from new to old space.
+ if (Page::FromAddress(obj->address())
+ ->IsFlagSet(Page::SWEEP_TO_ITERATE)) {
+ return ObjectMarking::IsBlack<kAtomicity>(obj,
+ MarkingState::External(obj))
+ ? obj
+ : nullptr;
+ }
DCHECK(ObjectMarking::IsGrey<kAtomicity>(obj, marking_state(obj)) ||
(obj->IsFiller() &&
ObjectMarking::IsWhite<kAtomicity>(obj, marking_state(obj))) ||
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698