Index: src/optimizing-compiler-thread.h |
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h |
index 60f95f4ea44ee4c89cc84f89a53ecdb5d9a3b2ee..d4f6921a7b040df8922f5bfff5b46871d36c6c5b 100644 |
--- a/src/optimizing-compiler-thread.h |
+++ b/src/optimizing-compiler-thread.h |
@@ -35,11 +35,13 @@ class OptimizingCompilerThread : public base::Thread { |
input_queue_shift_(0), |
osr_buffer_capacity_(FLAG_concurrent_recompilation_queue_length + 4), |
osr_buffer_cursor_(0), |
+ task_count_(0), |
osr_hits_(0), |
osr_attempts_(0), |
blocked_jobs_(0), |
tracing_enabled_(FLAG_trace_concurrent_recompilation), |
- job_based_recompilation_(FLAG_job_based_recompilation) { |
+ job_based_recompilation_(FLAG_job_based_recompilation), |
+ recompilation_delay_(FLAG_concurrent_recompilation_delay) { |
base::NoBarrier_Store(&stop_thread_, |
static_cast<base::AtomicWord>(CONTINUE)); |
input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_); |
@@ -93,8 +95,8 @@ class OptimizingCompilerThread : public base::Thread { |
void FlushInputQueue(bool restore_function_code); |
void FlushOutputQueue(bool restore_function_code); |
void FlushOsrBuffer(bool restore_function_code); |
- void CompileNext(); |
- OptimizedCompileJob* NextInput(); |
+ void CompileNext(OptimizedCompileJob* job); |
+ OptimizedCompileJob* NextInput(StopFlag* flag = NULL); |
// Add a recompilation task for OSR to the cyclic buffer, awaiting OSR entry. |
// Tasks evicted from the cyclic buffer are discarded. |
@@ -138,18 +140,23 @@ class OptimizingCompilerThread : public base::Thread { |
base::TimeDelta time_spent_compiling_; |
base::TimeDelta time_spent_total_; |
+ int task_count_; |
+ base::RecursiveMutex task_count_mutex_; |
Benedikt Meurer
2014/12/22 13:10:48
Why RecursiveMutex? Can we have a normal mutex ins
|
+ |
int osr_hits_; |
int osr_attempts_; |
int blocked_jobs_; |
- // Copies of FLAG_trace_concurrent_recompilation and |
+ // Copies of FLAG_trace_concurrent_recompilation, |
+ // FLAG_concurrent_recompilation_delay 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_; |
+ int recompilation_delay_; |
}; |
} } // namespace v8::internal |