Revision: 16946
Author: [email protected]
Date: Wed Sep 25 15:14:12 2013 UTC
Log: Allocate optimizing compiler thread only when necessary.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/24568003
http://code.google.com/p/v8/source/detail?r=16946
Modified:
/branches/bleeding_edge/src/isolate.cc
/branches/bleeding_edge/src/isolate.h
=======================================
--- /branches/bleeding_edge/src/isolate.cc Thu Sep 19 07:33:45 2013 UTC
+++ /branches/bleeding_edge/src/isolate.cc Wed Sep 25 15:14:12 2013 UTC
@@ -1803,7 +1803,7 @@
heap_profiler_(NULL),
function_entry_hook_(NULL),
deferred_handles_head_(NULL),
- optimizing_compiler_thread_(this),
+ optimizing_compiler_thread_(NULL),
marking_thread_(NULL),
sweeper_thread_(NULL),
stress_deopt_count_(0) {
@@ -1898,7 +1898,10 @@
debugger()->UnloadDebugger();
#endif
- if (FLAG_concurrent_recompilation) optimizing_compiler_thread_.Stop();
+ if (FLAG_concurrent_recompilation) {
+ optimizing_compiler_thread_->Stop();
+ delete optimizing_compiler_thread_;
+ }
if (FLAG_sweeper_threads > 0) {
for (int i = 0; i < FLAG_sweeper_threads; i++) {
@@ -2240,6 +2243,11 @@
deoptimizer_data_ = new DeoptimizerData(memory_allocator_);
+ if (FLAG_concurrent_recompilation) {
+ optimizing_compiler_thread_ = new OptimizingCompilerThread(this);
+ optimizing_compiler_thread_->Start();
+ }
+
const bool create_heap_objects = (des == NULL);
if (create_heap_objects && !heap_.CreateHeapObjects()) {
V8::FatalProcessOutOfMemory("heap object creation");
@@ -2345,8 +2353,6 @@
InternalArrayConstructorStubBase::InstallDescriptors(this);
FastNewClosureStub::InstallDescriptors(this);
}
-
- if (FLAG_concurrent_recompilation) optimizing_compiler_thread_.Start();
if (FLAG_marking_threads > 0) {
marking_thread_ = new MarkingThread*[FLAG_marking_threads];
=======================================
--- /branches/bleeding_edge/src/isolate.h Thu Sep 19 07:33:45 2013 UTC
+++ /branches/bleeding_edge/src/isolate.h Wed Sep 25 15:14:12 2013 UTC
@@ -1099,7 +1099,7 @@
#endif // DEBUG
OptimizingCompilerThread* optimizing_compiler_thread() {
- return &optimizing_compiler_thread_;
+ return optimizing_compiler_thread_;
}
// PreInits and returns a default isolate. Needed when a new thread tries
@@ -1369,7 +1369,7 @@
#endif
DeferredHandles* deferred_handles_head_;
- OptimizingCompilerThread optimizing_compiler_thread_;
+ OptimizingCompilerThread* optimizing_compiler_thread_;
MarkingThread** marking_thread_;
SweeperThread** sweeper_thread_;
--
--
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.