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

Unified Diff: src/heap/spaces.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/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index afbb452f54527878fe55a8b4034344f51b535627..db8fb4b7d066bb67c6454827b3570cad811e77d7 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -56,10 +56,14 @@ bool HeapObjectIterator::AdvanceToNextPage() {
DCHECK_EQ(cur_addr_, cur_end_);
if (current_page_ == page_range_.end()) return false;
Page* cur_page = *(current_page_++);
- space_->heap()
- ->mark_compact_collector()
- ->sweeper()
- .SweepOrWaitUntilSweepingCompleted(cur_page);
+ Heap* heap = space_->heap();
+
+ heap->mark_compact_collector()->sweeper().SweepOrWaitUntilSweepingCompleted(
+ cur_page);
+ if (cur_page->IsFlagSet(Page::SWEEP_TO_ITERATE))
+ heap->minor_mark_compact_collector()->MakeIterable(
+ cur_page, MarkingTreatmentMode::CLEAR,
+ FreeSpaceTreatmentMode::IGNORE_FREE_SPACE);
cur_addr_ = cur_page->area_start();
cur_end_ = cur_page->area_end();
DCHECK(cur_page->SweepingDone());
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698