Revision: 15198
Author: [email protected]
Date: Wed Jun 19 01:57:26 2013
Log: Move static flag modifications to
V8::InitializeOncePerProcessImpl().
BUG=
[email protected]
Review URL: https://codereview.chromium.org/17250006
http://code.google.com/p/v8/source/detail?r=15198
Modified:
/branches/bleeding_edge/src/isolate.cc
/branches/bleeding_edge/src/v8.cc
=======================================
--- /branches/bleeding_edge/src/isolate.cc Wed Jun 12 01:57:36 2013
+++ /branches/bleeding_edge/src/isolate.cc Wed Jun 19 01:57:26 2013
@@ -2259,46 +2259,20 @@
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;
}
=======================================
--- /branches/bleeding_edge/src/v8.cc Tue Jun 11 03:41:14 2013
+++ /branches/bleeding_edge/src/v8.cc Wed Jun 19 01:57:26 2013
@@ -271,6 +271,44 @@
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();
--
--
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.