We don't need a lock for the output queue on the main thread
authorjochen <jochen@chromium.org>
Tue, 24 Feb 2015 13:42:05 +0000 (05:42 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 24 Feb 2015 13:42:15 +0000 (13:42 +0000)
The output queue is supposed to be a lock-free anyways, we're just
temporarily abusing it by having multiple producers. For those, we need
the lock when enqueuing jobs.

BUG=none
R=yangguo@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/953883002

Cr-Commit-Position: refs/heads/master@{#26824}

src/optimizing-compiler-thread.cc

index 86d9b5c..fa524a8 100644 (file)
@@ -211,7 +211,6 @@ void OptimizingCompilerThread::FlushInputQueue(bool restore_function_code) {
 
 
 void OptimizingCompilerThread::FlushOutputQueue(bool restore_function_code) {
-  base::LockGuard<base::Mutex> access_output_queue_(&output_queue_mutex_);
   OptimizedCompileJob* job;
   while (output_queue_.Dequeue(&job)) {
     // OSR jobs are dealt with separately.