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

Side by Side Diff: src/v8.cc

Issue 68203029: Make number of available threads isolate-dependent and expose it to ResourceConstraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/sweeper-thread.cc ('k') | test/cctest/test-deoptimization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 173
174 void V8::InitializeOncePerProcessImpl() { 174 void V8::InitializeOncePerProcessImpl() {
175 FlagList::EnforceFlagImplications(); 175 FlagList::EnforceFlagImplications();
176 if (FLAG_stress_compaction) { 176 if (FLAG_stress_compaction) {
177 FLAG_force_marking_deque_overflows = true; 177 FLAG_force_marking_deque_overflows = true;
178 FLAG_gc_global = true; 178 FLAG_gc_global = true;
179 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; 179 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
180 } 180 }
181 181
182 if (FLAG_concurrent_recompilation &&
183 (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs)) {
184 FLAG_concurrent_recompilation = false;
185 FLAG_concurrent_osr = false;
186 PrintF("Concurrent recompilation has been disabled for tracing.\n");
187 }
188
189 if (FLAG_sweeper_threads <= 0) {
190 if (FLAG_concurrent_sweeping) {
191 FLAG_sweeper_threads = SystemThreadManager::
192 NumberOfParallelSystemThreads(
193 SystemThreadManager::CONCURRENT_SWEEPING);
194 } else if (FLAG_parallel_sweeping) {
195 FLAG_sweeper_threads = SystemThreadManager::
196 NumberOfParallelSystemThreads(
197 SystemThreadManager::PARALLEL_SWEEPING);
198 }
199 if (FLAG_sweeper_threads == 0) {
200 FLAG_concurrent_sweeping = false;
201 FLAG_parallel_sweeping = false;
202 }
203 } else if (!FLAG_concurrent_sweeping && !FLAG_parallel_sweeping) {
204 FLAG_sweeper_threads = 0;
205 }
206
207 if (FLAG_concurrent_recompilation &&
208 SystemThreadManager::NumberOfParallelSystemThreads(
209 SystemThreadManager::CONCURRENT_RECOMPILATION) == 0) {
210 FLAG_concurrent_recompilation = false;
211 FLAG_concurrent_osr = false;
212 }
213
214 Sampler::SetUp(); 182 Sampler::SetUp();
215 CPU::SetUp(); 183 CPU::SetUp();
216 OS::PostSetUp(); 184 OS::PostSetUp();
217 ElementsAccessor::InitializeOncePerProcess(); 185 ElementsAccessor::InitializeOncePerProcess();
218 LOperand::SetUpCaches(); 186 LOperand::SetUpCaches();
219 SetUpJSCallerSavedCodeData(); 187 SetUpJSCallerSavedCodeData();
220 ExternalReference::SetUp(); 188 ExternalReference::SetUp();
221 Bootstrapper::InitializeOncePerProcess(); 189 Bootstrapper::InitializeOncePerProcess();
222 } 190 }
223 191
224 192
225 void V8::InitializeOncePerProcess() { 193 void V8::InitializeOncePerProcess() {
226 CallOnce(&init_once, &InitializeOncePerProcessImpl); 194 CallOnce(&init_once, &InitializeOncePerProcessImpl);
227 } 195 }
228 196
229 } } // namespace v8::internal 197 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/sweeper-thread.cc ('k') | test/cctest/test-deoptimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698