| Index: src/optimizing-compiler-thread.cc
|
| diff --git a/src/optimizing-compiler-thread.cc b/src/optimizing-compiler-thread.cc
|
| index 06018dd1a993b876d9e846eb73c5ffc5af034c2e..48ee12c680b33b8692c63755cc80bed3ca3bc5dd 100644
|
| --- a/src/optimizing-compiler-thread.cc
|
| +++ b/src/optimizing-compiler-thread.cc
|
| @@ -72,7 +72,13 @@ void OptimizingCompilerThread::Run() {
|
| USE(status);
|
|
|
| output_queue_.Enqueue(optimizing_compiler);
|
| - isolate_->stack_guard()->RequestCodeReadyEvent();
|
| + if (!FLAG_manual_parallel_recompilation) {
|
| + isolate_->stack_guard()->RequestCodeReadyEvent();
|
| + } else {
|
| + // In manual mode, do not trigger a code ready event.
|
| + // Instead, wait for the optimized functions to be installed manually.
|
| + output_queue_semaphore_->Signal();
|
| + }
|
|
|
| if (FLAG_trace_parallel_recompilation) {
|
| time_spent_compiling_ += OS::Ticks() - compiling_start;
|
| @@ -99,6 +105,9 @@ void OptimizingCompilerThread::InstallOptimizedFunctions() {
|
| HandleScope handle_scope(isolate_);
|
| int functions_installed = 0;
|
| while (!output_queue_.IsEmpty()) {
|
| + if (FLAG_manual_parallel_recompilation) {
|
| + output_queue_semaphore_->Wait();
|
| + }
|
| OptimizingCompiler* compiler = NULL;
|
| output_queue_.Dequeue(&compiler);
|
| Compiler::InstallOptimizedCode(compiler);
|
| @@ -110,6 +119,17 @@ void OptimizingCompilerThread::InstallOptimizedFunctions() {
|
| }
|
|
|
|
|
| +Handle<SharedFunctionInfo>
|
| + OptimizingCompilerThread::InstallNextOptimizedFunction() {
|
| + ASSERT(FLAG_manual_parallel_recompilation);
|
| + output_queue_semaphore_->Wait();
|
| + OptimizingCompiler* compiler = NULL;
|
| + output_queue_.Dequeue(&compiler);
|
| + Compiler::InstallOptimizedCode(compiler);
|
| + return compiler->info()->shared_info();
|
| +}
|
| +
|
| +
|
| void OptimizingCompilerThread::QueueForOptimization(
|
| OptimizingCompiler* optimizing_compiler) {
|
| input_queue_.Enqueue(optimizing_compiler);
|
|
|