Commit 137a8c51 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Move static flag modifications to V8::InitializeOncePerProcessImpl().

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6510948b
......@@ -2259,46 +2259,20 @@ bool Isolate::Init(Deserializer* des) {
if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Start();
if (FLAG_parallel_marking && FLAG_marking_threads == 0) {
FLAG_marking_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_MARKING);
}
if (FLAG_marking_threads > 0) {
marking_thread_ = new MarkingThread*[FLAG_marking_threads];
for (int i = 0; i < FLAG_marking_threads; i++) {
marking_thread_[i] = new MarkingThread(this);
marking_thread_[i]->Start();
}
} else {
FLAG_parallel_marking = false;
}
if (FLAG_sweeper_threads == 0) {
if (FLAG_concurrent_sweeping) {
FLAG_sweeper_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::CONCURRENT_SWEEPING);
} else if (FLAG_parallel_sweeping) {
FLAG_sweeper_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_SWEEPING);
}
}
if (FLAG_sweeper_threads > 0) {
sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads];
for (int i = 0; i < FLAG_sweeper_threads; i++) {
sweeper_thread_[i] = new SweeperThread(this);
sweeper_thread_[i]->Start();
}
} else {
FLAG_concurrent_sweeping = false;
FLAG_parallel_sweeping = false;
}
if (FLAG_parallel_recompilation &&
SystemThreadManager::NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_RECOMPILATION) == 0) {
FLAG_parallel_recompilation = false;
}
return true;
}
......
......@@ -271,6 +271,44 @@ void V8::InitializeOncePerProcessImpl() {
FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
}
if (FLAG_trace_hydrogen) FLAG_parallel_recompilation = false;
if (FLAG_sweeper_threads <= 0) {
if (FLAG_concurrent_sweeping) {
FLAG_sweeper_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::CONCURRENT_SWEEPING);
} else if (FLAG_parallel_sweeping) {
FLAG_sweeper_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_SWEEPING);
}
if (FLAG_sweeper_threads == 0) {
FLAG_concurrent_sweeping = false;
FLAG_parallel_sweeping = false;
}
} else if (!FLAG_concurrent_sweeping && !FLAG_parallel_sweeping) {
FLAG_sweeper_threads = 0;
}
if (FLAG_parallel_marking) {
if (FLAG_marking_threads <= 0) {
FLAG_marking_threads = SystemThreadManager::
NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_MARKING);
}
if (FLAG_marking_threads == 0) {
FLAG_parallel_marking = false;
}
} else {
FLAG_marking_threads = 0;
}
if (FLAG_parallel_recompilation &&
SystemThreadManager::NumberOfParallelSystemThreads(
SystemThreadManager::PARALLEL_RECOMPILATION) == 0) {
FLAG_parallel_recompilation = false;
}
OS::SetUp();
Sampler::SetUp();
CPU::SetUp();
......
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