diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-14 00:52:27 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-14 16:34:58 +0100 |
commit | 5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1 (patch) | |
tree | ab5f510c4d83b175681de629395525bf7ec7cedb /deps/v8/src/optimizing-compiler-thread.h | |
parent | 3b3d89bad26f5dfebe73fef6ae284ee78acbd5c9 (diff) | |
download | node-new-5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1.tar.gz |
deps: upgrade v8 to 3.30.37
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 |