| 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 "src/optimizing-compile-dispatcher.h" | 5 #include "src/optimizing-compile-dispatcher.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/full-codegen/full-codegen.h" | 8 #include "src/full-codegen/full-codegen.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/tracing/trace-event.h" | 10 #include "src/tracing/trace-event.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // v8::Task overrides. | 45 // v8::Task overrides. |
| 46 void Run() override { | 46 void Run() override { |
| 47 DisallowHeapAllocation no_allocation; | 47 DisallowHeapAllocation no_allocation; |
| 48 DisallowHandleAllocation no_handles; | 48 DisallowHandleAllocation no_handles; |
| 49 DisallowHandleDereference no_deref; | 49 DisallowHandleDereference no_deref; |
| 50 | 50 |
| 51 OptimizingCompileDispatcher* dispatcher = | 51 OptimizingCompileDispatcher* dispatcher = |
| 52 isolate_->optimizing_compile_dispatcher(); | 52 isolate_->optimizing_compile_dispatcher(); |
| 53 { | 53 { |
| 54 TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_); | 54 TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_); |
| 55 TRACE_EVENT0("v8", "V8.RecompileConcurrent"); | 55 |
| 56 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
| 57 "V8.RecompileConcurrent"); |
| 56 | 58 |
| 57 if (dispatcher->recompilation_delay_ != 0) { | 59 if (dispatcher->recompilation_delay_ != 0) { |
| 58 base::OS::Sleep(base::TimeDelta::FromMilliseconds( | 60 base::OS::Sleep(base::TimeDelta::FromMilliseconds( |
| 59 dispatcher->recompilation_delay_)); | 61 dispatcher->recompilation_delay_)); |
| 60 } | 62 } |
| 61 | 63 |
| 62 dispatcher->CompileNext(dispatcher->NextInput(true)); | 64 dispatcher->CompileNext(dispatcher->NextInput(true)); |
| 63 } | 65 } |
| 64 { | 66 { |
| 65 base::LockGuard<base::Mutex> lock_guard(&dispatcher->ref_count_mutex_); | 67 base::LockGuard<base::Mutex> lock_guard(&dispatcher->ref_count_mutex_); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 while (blocked_jobs_ > 0) { | 219 while (blocked_jobs_ > 0) { |
| 218 V8::GetCurrentPlatform()->CallOnBackgroundThread( | 220 V8::GetCurrentPlatform()->CallOnBackgroundThread( |
| 219 new CompileTask(isolate_), v8::Platform::kShortRunningTask); | 221 new CompileTask(isolate_), v8::Platform::kShortRunningTask); |
| 220 blocked_jobs_--; | 222 blocked_jobs_--; |
| 221 } | 223 } |
| 222 } | 224 } |
| 223 | 225 |
| 224 | 226 |
| 225 } // namespace internal | 227 } // namespace internal |
| 226 } // namespace v8 | 228 } // namespace v8 |
| OLD | NEW |