Reviewers: Hannes Payer,

Description:
Remove support for parallel sweeping

BUG=none
[email protected]
LOG=y

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

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

Affected files (+3, -32 lines):
  M src/flag-definitions.h
  M src/heap/mark-compact.h
  M src/heap/mark-compact.cc


Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index 4cc4f2502ecb0de91066745ebec9655ac7599630..bfa2dca5c2741b9e3c174ab165a8167801e6ea43 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -531,10 +531,6 @@ DEFINE_BOOL(trace_incremental_marking, false,
             "trace progress of the incremental marking")
 DEFINE_BOOL(track_gc_object_stats, false,
             "track object counts and memory usage")
-DEFINE_BOOL(parallel_sweeping, false, "enable parallel sweeping")
-DEFINE_BOOL(concurrent_sweeping, true, "enable concurrent sweeping")
-DEFINE_INT(sweeper_threads, 0,
-           "number of parallel and concurrent sweeping threads")
 #ifdef VERIFY_HEAP
 DEFINE_BOOL(verify_heap, false, "verify heap pointers before and after GC")
 #endif
@@ -663,8 +659,6 @@ DEFINE_BOOL(profile_hydrogen_code_stub_compilation, false,
 DEFINE_BOOL(predictable, false, "enable predictable mode")
 DEFINE_NEG_IMPLICATION(predictable, concurrent_recompilation)
 DEFINE_NEG_IMPLICATION(predictable, concurrent_osr)
-DEFINE_NEG_IMPLICATION(predictable, concurrent_sweeping)
-DEFINE_NEG_IMPLICATION(predictable, parallel_sweeping)


 //
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index ae99d98405808ab58e06fb4484402ed5a4a7380c..69fc579e2fe65ec359644efd01362e5bea362d61 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -4167,7 +4167,6 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {

     switch (sweeper) {
       case CONCURRENT_SWEEPING:
-      case PARALLEL_SWEEPING:
         if (!parallel_sweeping_active) {
           if (FLAG_gc_verbose) {
             PrintF("Sweeping 0x%" V8PRIxPTR ".\n",
@@ -4218,19 +4217,6 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
 }


-static bool ShouldStartSweeperThreads(MarkCompactCollector::SweeperType type) {
-  return (type == MarkCompactCollector::PARALLEL_SWEEPING ||
-          type == MarkCompactCollector::CONCURRENT_SWEEPING) &&
-         !FLAG_predictable;
-}
-
-
-static bool ShouldWaitForSweeperThreads(
-    MarkCompactCollector::SweeperType type) {
-  return type == MarkCompactCollector::PARALLEL_SWEEPING;
-}
-
-
 void MarkCompactCollector::SweepSpaces() {
   GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_SWEEP);
   double start_time = 0.0;
@@ -4241,10 +4227,6 @@ void MarkCompactCollector::SweepSpaces() {
 #ifdef DEBUG
   state_ = SWEEP_SPACES;
 #endif
-  SweeperType how_to_sweep = CONCURRENT_SWEEPING;
-  if (FLAG_parallel_sweeping) how_to_sweep = PARALLEL_SWEEPING;
-  if (FLAG_concurrent_sweeping) how_to_sweep = CONCURRENT_SWEEPING;
-
   MoveEvacuationCandidatesToEndOfPagesList();

   // Noncompacting collections simply sweep the spaces to clear the mark
@@ -4257,17 +4239,13 @@ void MarkCompactCollector::SweepSpaces() {
                                 GCTracer::Scope::MC_SWEEP_OLDSPACE);
     {
       SequentialSweepingScope scope(this);
-      SweepSpace(heap()->old_pointer_space(), how_to_sweep);
-      SweepSpace(heap()->old_data_space(), how_to_sweep);
+      SweepSpace(heap()->old_pointer_space(), CONCURRENT_SWEEPING);
+      SweepSpace(heap()->old_data_space(), CONCURRENT_SWEEPING);
     }

-    if (ShouldStartSweeperThreads(how_to_sweep)) {
+    if (!FLAG_predictable) {
       StartSweeperThreads();
     }
-
-    if (ShouldWaitForSweeperThreads(how_to_sweep)) {
-      EnsureSweepingCompleted();
-    }
   }
   RemoveDeadInvalidatedCode();

Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 6afb8d6416e12e2b2237fa27eaa02c4a706b2aaf..5e615b306ef8b8cab0dd2793313f3ae64b7ba9c7 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -547,7 +547,6 @@ class MarkCompactCollector {
   void EnableCodeFlushing(bool enable);

   enum SweeperType {
-    PARALLEL_SWEEPING,
     CONCURRENT_SWEEPING,
     SEQUENTIAL_SWEEPING
   };


--
--
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/d/optout.

Reply via email to