Turn off parallel and concurrent sweeping on system with just one processor/core.
authorhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 28 Feb 2013 15:18:15 +0000 (15:18 +0000)
committerhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 28 Feb 2013 15:18:15 +0000 (15:18 +0000)
BUG=

Review URL: https://codereview.chromium.org/12380020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/isolate.cc

index 59d498c..c8e6f05 100644 (file)
@@ -136,7 +136,7 @@ int SystemThreadManager::NumberOfParallelSystemThreads(
   int number_of_threads = Min(OS::NumberOfCores(), kMaxThreads);
   ASSERT(number_of_threads > 0);
   if (number_of_threads ==  1) {
-    return 1;
+    return 0;
   }
   if (type == PARALLEL_SWEEPING) {
     return number_of_threads;
@@ -2173,6 +2173,8 @@ bool Isolate::Init(Deserializer* des) {
       marking_thread_[i] = new MarkingThread(this);
       marking_thread_[i]->Start();
     }
+  } else {
+    FLAG_parallel_marking = false;
   }
 
   if (FLAG_sweeper_threads == 0) {
@@ -2192,6 +2194,9 @@ bool Isolate::Init(Deserializer* des) {
       sweeper_thread_[i] = new SweeperThread(this);
       sweeper_thread_[i]->Start();
     }
+  } else {
+    FLAG_concurrent_sweeping = false;
+    FLAG_parallel_sweeping = false;
   }
   return true;
 }