Commit a2b216c4 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Turn off parallel and concurrent sweeping on system with just one processor/core.

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
parent a9374e2f
...@@ -136,7 +136,7 @@ int SystemThreadManager::NumberOfParallelSystemThreads( ...@@ -136,7 +136,7 @@ int SystemThreadManager::NumberOfParallelSystemThreads(
int number_of_threads = Min(OS::NumberOfCores(), kMaxThreads); int number_of_threads = Min(OS::NumberOfCores(), kMaxThreads);
ASSERT(number_of_threads > 0); ASSERT(number_of_threads > 0);
if (number_of_threads == 1) { if (number_of_threads == 1) {
return 1; return 0;
} }
if (type == PARALLEL_SWEEPING) { if (type == PARALLEL_SWEEPING) {
return number_of_threads; return number_of_threads;
...@@ -2173,6 +2173,8 @@ bool Isolate::Init(Deserializer* des) { ...@@ -2173,6 +2173,8 @@ bool Isolate::Init(Deserializer* des) {
marking_thread_[i] = new MarkingThread(this); marking_thread_[i] = new MarkingThread(this);
marking_thread_[i]->Start(); marking_thread_[i]->Start();
} }
} else {
FLAG_parallel_marking = false;
} }
if (FLAG_sweeper_threads == 0) { if (FLAG_sweeper_threads == 0) {
...@@ -2192,6 +2194,9 @@ bool Isolate::Init(Deserializer* des) { ...@@ -2192,6 +2194,9 @@ bool Isolate::Init(Deserializer* des) {
sweeper_thread_[i] = new SweeperThread(this); sweeper_thread_[i] = new SweeperThread(this);
sweeper_thread_[i]->Start(); sweeper_thread_[i]->Start();
} }
} else {
FLAG_concurrent_sweeping = false;
FLAG_parallel_sweeping = false;
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment