Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Unified Diff: src/optimizing-compiler-thread.h

Issue 948863002: Get rid of recursive locks for job based recompilation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index 3088843309fbe31b3eed34d8d079719f2431241b..d2f85d972661c609129d8d54c307f748223ae0af 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -35,10 +35,10 @@ 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),
+ ref_count_(1),
tracing_enabled_(FLAG_trace_concurrent_recompilation),
job_based_recompilation_(FLAG_job_based_recompilation),
recompilation_delay_(FLAG_concurrent_recompilation_delay) {
@@ -140,18 +140,13 @@ class OptimizingCompilerThread : public base::Thread {
base::TimeDelta time_spent_compiling_;
base::TimeDelta time_spent_total_;
- int task_count_;
- // TODO(jochen): This is currently a RecursiveMutex since both Flush/Stop and
- // Unblock try to get it, but the former methods both can call Unblock. Once
- // job based recompilation is on by default, and the dedicated thread can be
- // removed, this should be refactored to not use a RecursiveMutex.
- base::RecursiveMutex task_count_mutex_;
-
int osr_hits_;
int osr_attempts_;
int blocked_jobs_;
+ volatile base::AtomicWord ref_count_;
+
// Copies of FLAG_trace_concurrent_recompilation,
// FLAG_concurrent_recompilation_delay and
// FLAG_job_based_recompilation that will be used from the background thread.
« no previous file with comments | « src/flag-definitions.h ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698