Reviewers: Michael Starzinger,

Description:
Integrate concurrent sweeping with incremental marking.

BUG=


Please review this at https://codereview.chromium.org/12527011/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/heap.h
  M src/incremental-marking.cc


Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index f79b0eabb71132bbcda0ce10439e53e41bbc16f7..9177b40f663bd84aa2d1fea1c515ae3c9fad0b36 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1697,6 +1697,12 @@ class Heap {
     return sweeping_complete;
   }

+  bool EnsureSweepersProgressed(int step_size) {
+ bool sweeping_complete = old_data_space()->EnsureSweeperProgress(step_size); + sweeping_complete &= old_pointer_space()->EnsureSweeperProgress(step_size);
+    return sweeping_complete;
+  }
+
   ExternalStringTable* external_string_table() {
     return &external_string_table_;
   }
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index e2fca5b1a08059fea4eb213bbf65f7f1b6525581..658a34c9cd37e5150a51f5641c5168fe16ed5bf4 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -562,7 +562,6 @@ void IncrementalMarking::UncommitMarkingDeque() {


 void IncrementalMarking::Start() {
- ASSERT(!heap_->mark_compact_collector()->IsConcurrentSweepingInProgress());
   if (FLAG_trace_incremental_marking) {
     PrintF("[IncrementalMarking] Start\n");
   }
@@ -901,7 +900,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
   }

   if (state_ == SWEEPING) {
-    if (heap_->AdvanceSweepers(static_cast<int>(bytes_to_process))) {
+ if (heap_->EnsureSweepersProgressed(static_cast<int>(bytes_to_process))) {
       bytes_scanned_ = 0;
       StartMarking(PREVENT_COMPACTION);
     }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to