diff options
Diffstat (limited to 'deps/v8/src/optimizing-compiler-thread.h')
-rw-r--r-- | deps/v8/src/optimizing-compiler-thread.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/deps/v8/src/optimizing-compiler-thread.h b/deps/v8/src/optimizing-compiler-thread.h index 6ff4f2a61a..60f95f4ea4 100644 --- a/deps/v8/src/optimizing-compiler-thread.h +++ b/deps/v8/src/optimizing-compiler-thread.h @@ -37,7 +37,9 @@ class OptimizingCompilerThread : public base::Thread { osr_buffer_cursor_(0), osr_hits_(0), osr_attempts_(0), - blocked_jobs_(0) { + blocked_jobs_(0), + tracing_enabled_(FLAG_trace_concurrent_recompilation), + job_based_recompilation_(FLAG_job_based_recompilation) { base::NoBarrier_Store(&stop_thread_, static_cast<base::AtomicWord>(CONTINUE)); input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_); @@ -84,6 +86,8 @@ class OptimizingCompilerThread : public base::Thread { #endif private: + class CompileTask; + enum StopFlag { CONTINUE, STOP, FLUSH }; void FlushInputQueue(bool restore_function_code); @@ -121,6 +125,9 @@ class OptimizingCompilerThread : public base::Thread { // Queue of recompilation tasks ready to be installed (excluding OSR). UnboundQueue<OptimizedCompileJob*> output_queue_; + // Used for job based recompilation which has multiple producers on + // different threads. + base::Mutex output_queue_mutex_; // Cyclic buffer of recompilation tasks for OSR. OptimizedCompileJob** osr_buffer_; @@ -135,6 +142,14 @@ class OptimizingCompilerThread : public base::Thread { int osr_attempts_; int blocked_jobs_; + + // Copies of FLAG_trace_concurrent_recompilation and + // FLAG_job_based_recompilation that will be used from the background thread. + // + // Since flags might get modified while the background thread is running, it + // is not safe to access them directly. + bool tracing_enabled_; + bool job_based_recompilation_; }; } } // namespace v8::internal |