| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 set_event_logger(Logger::DefaultEventLoggerSentinel); | 2104 set_event_logger(Logger::DefaultEventLoggerSentinel); |
| 2105 } | 2105 } |
| 2106 | 2106 |
| 2107 // Set default value if not yet set. | 2107 // Set default value if not yet set. |
| 2108 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults | 2108 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults |
| 2109 // once ResourceConstraints becomes an argument to the Isolate constructor. | 2109 // once ResourceConstraints becomes an argument to the Isolate constructor. |
| 2110 if (max_available_threads_ < 1) { | 2110 if (max_available_threads_ < 1) { |
| 2111 // Choose the default between 1 and 4. | 2111 // Choose the default between 1 and 4. |
| 2112 max_available_threads_ = | 2112 max_available_threads_ = |
| 2113 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); | 2113 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); |
| 2114 if (FLAG_single_threaded) max_available_threads_ = 1; |
| 2114 } | 2115 } |
| 2115 | 2116 |
| 2116 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 2117 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
| 2117 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 2118 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
| 2118 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { | 2119 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { |
| 2119 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); | 2120 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); |
| 2120 optimizing_compiler_thread_->Start(); | 2121 optimizing_compiler_thread_->Start(); |
| 2121 } | 2122 } |
| 2122 | 2123 |
| 2123 // Initialize runtime profiler before deserialization, because collections may | 2124 // Initialize runtime profiler before deserialization, because collections may |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2640 if (prev_ && prev_->Intercept(flag)) return true; | 2641 if (prev_ && prev_->Intercept(flag)) return true; |
| 2641 // Then check whether this scope intercepts. | 2642 // Then check whether this scope intercepts. |
| 2642 if ((flag & intercept_mask_)) { | 2643 if ((flag & intercept_mask_)) { |
| 2643 intercepted_flags_ |= flag; | 2644 intercepted_flags_ |= flag; |
| 2644 return true; | 2645 return true; |
| 2645 } | 2646 } |
| 2646 return false; | 2647 return false; |
| 2647 } | 2648 } |
| 2648 | 2649 |
| 2649 } } // namespace v8::internal | 2650 } } // namespace v8::internal |
| OLD | NEW |