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: { |