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

Side by Side Diff: src/isolate.cc

Issue 170483002: Ensure that the worker pool is running if we intend to use it (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/libplatform/default-platform.h » ('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 21 matching lines...) Expand all
32 #include "ast.h" 32 #include "ast.h"
33 #include "bootstrapper.h" 33 #include "bootstrapper.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "compilation-cache.h" 35 #include "compilation-cache.h"
36 #include "cpu-profiler.h" 36 #include "cpu-profiler.h"
37 #include "debug.h" 37 #include "debug.h"
38 #include "deoptimizer.h" 38 #include "deoptimizer.h"
39 #include "heap-profiler.h" 39 #include "heap-profiler.h"
40 #include "hydrogen.h" 40 #include "hydrogen.h"
41 #include "isolate-inl.h" 41 #include "isolate-inl.h"
42 #ifdef V8_USE_DEFAULT_PLATFORM
tfarina 2014/02/18 16:49:02 separate this out, like we generally do in chromiu
jochen (gone - plz use gerrit) 2014/02/18 21:39:01 in v8 the headers are sorted regardless of defines
43 #include "libplatform/default-platform.h"
44 #endif
42 #include "lithium-allocator.h" 45 #include "lithium-allocator.h"
43 #include "log.h" 46 #include "log.h"
44 #include "messages.h" 47 #include "messages.h"
45 #include "platform.h" 48 #include "platform.h"
46 #include "regexp-stack.h" 49 #include "regexp-stack.h"
47 #include "runtime-profiler.h" 50 #include "runtime-profiler.h"
48 #include "sampler.h" 51 #include "sampler.h"
49 #include "scopeinfo.h" 52 #include "scopeinfo.h"
50 #include "serialize.h" 53 #include "serialize.h"
51 #include "simulator.h" 54 #include "simulator.h"
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 builtins_.SetUp(this, create_heap_objects); 2013 builtins_.SetUp(this, create_heap_objects);
2011 2014
2012 // Set default value if not yet set. 2015 // Set default value if not yet set.
2013 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults 2016 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults
2014 // once ResourceConstraints becomes an argument to the Isolate constructor. 2017 // once ResourceConstraints becomes an argument to the Isolate constructor.
2015 if (max_available_threads_ < 1) { 2018 if (max_available_threads_ < 1) {
2016 // Choose the default between 1 and 4. 2019 // Choose the default between 1 and 4.
2017 max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1); 2020 max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1);
2018 } 2021 }
2019 2022
2020 if (!FLAG_job_based_sweeping) { 2023 if (FLAG_job_based_sweeping) {
2024 #ifdef V8_USE_DEFAULT_PLATFORM
2025 static_cast<DefaultPlatform*>(V8::GetCurrentPlatform())
2026 ->EnsureInitialized();
2027 #endif
2028 } else {
2021 num_sweeper_threads_ = 2029 num_sweeper_threads_ =
2022 SweeperThread::NumberOfThreads(max_available_threads_); 2030 SweeperThread::NumberOfThreads(max_available_threads_);
2023 } 2031 }
2024 2032
2025 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { 2033 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) {
2026 PrintF("Concurrent recompilation has been disabled for tracing.\n"); 2034 PrintF("Concurrent recompilation has been disabled for tracing.\n");
2027 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { 2035 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) {
2028 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); 2036 optimizing_compiler_thread_ = new OptimizingCompilerThread(this);
2029 optimizing_compiler_thread_->Start(); 2037 optimizing_compiler_thread_->Start();
2030 } 2038 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 2327
2320 #ifdef DEBUG 2328 #ifdef DEBUG
2321 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2329 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2322 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2330 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2323 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2331 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2324 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2332 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2325 #undef ISOLATE_FIELD_OFFSET 2333 #undef ISOLATE_FIELD_OFFSET
2326 #endif 2334 #endif
2327 2335
2328 } } // namespace v8::internal 2336 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/libplatform/default-platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698