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

Unified Diff: src/mark-compact.cc

Issue 11280120: Sweep pages with lowest live memory first. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index fe0c685c6995ef39bd8ad6b3f74219194332b386..992c81c6010a24f1062f367ef5675e919509cf50 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -559,7 +559,9 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() {
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
+ heap()->paged_space(OLD_DATA_SPACE)->SetPagesToSweep(NULL);
heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
+ heap()->paged_space(OLD_POINTER_SPACE)->SetPagesToSweep(NULL);
}
@@ -3828,9 +3830,9 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n",
reinterpret_cast<intptr_t>(p));
}
- SweepConservatively<SWEEP_SEQUENTIALLY>(space, NULL, p);
+ space->SetPagesToSweep(p);
+ space->AdvanceSweeper(0);
pages_swept++;
- space->SetPagesToSweep(p->next_page());
lazy_sweeping_active = true;
}
break;
@@ -3842,7 +3844,8 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n",
reinterpret_cast<intptr_t>(p));
}
- SweepConservatively<SWEEP_SEQUENTIALLY>(space, NULL, p);
+ space->SetPagesToSweep(p);
+ space->AdvanceSweeper(0);
pages_swept++;
parallel_sweeping_active = true;
} else {
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698