Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: src/v8.cc

Issue 17250006: Move static flag modifications to V8::InitializeOncePerProcessImpl(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index 80b12deea62ca80773964baa70115d53389f497f..cb67105c3f55c08b4953b30d7b948e6823449d60 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -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();
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698