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

Unified Diff: src/mark-compact.cc

Issue 12444003: Presweep one page before parallel/concurrent sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | no next file » | 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 ea797a5866a63fb26dd46b76baeadb85effeccc6..3a7018bfb1fca5bd31a7205b93d41f540cdcc156 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -3774,6 +3774,7 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
int pages_swept = 0;
bool lazy_sweeping_active = false;
bool unused_page_present = false;
+ bool presweep = true;
while (it.has_next()) {
Page* p = it.next();
@@ -3845,8 +3846,14 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
PrintF("Sweeping 0x%" V8PRIxPTR " conservatively in parallel.\n",
reinterpret_cast<intptr_t>(p));
}
- p->set_parallel_sweeping(1);
- space->IncreaseUnsweptFreeBytes(p);
+ if (presweep) {
Michael Starzinger 2013/03/05 15:35:20 Can we use a "parallel_sweeping_flag" instead, to
Hannes Payer (out of office) 2013/03/05 17:22:48 Done.
+ SweepConservatively<SWEEP_SEQUENTIALLY>(space, NULL, p);
+ pages_swept++;
+ presweep = false;
+ } else {
+ p->set_parallel_sweeping(1);
+ space->IncreaseUnsweptFreeBytes(p);
+ }
break;
}
case PRECISE: {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698