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

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

Issue 25237003: Remove unnecessary mutex. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/optimizing-compiler-thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.cc
diff --git a/src/optimizing-compiler-thread.cc b/src/optimizing-compiler-thread.cc
index d9c82ce70152abea0200a6e9d78a43a87de1bb61..202e6e5c57e0b2ac2624f369c704344300219e44 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -108,7 +108,6 @@ void OptimizingCompilerThread::CompileNext() {
// The function may have already been optimized by OSR. Simply continue.
// Use a mutex to make sure that functions marked for install
// are always also queued.
- LockGuard<Mutex> access_queue(&queue_mutex_);
output_queue_.Enqueue(job);
isolate_->stack_guard()->RequestInstallCode();
}
@@ -147,10 +146,7 @@ void OptimizingCompilerThread::FlushInputQueue(bool restore_function_code) {
void OptimizingCompilerThread::FlushOutputQueue(bool restore_function_code) {
RecompileJob* job;
- while (true) {
- { LockGuard<Mutex> access_queue(&queue_mutex_);
- if (!output_queue_.Dequeue(&job)) break;
- }
+ while (output_queue_.Dequeue(&job)) {
// OSR jobs are dealt with separately.
if (!job->info()->is_osr()) {
DisposeRecompileJob(job, restore_function_code);
@@ -220,10 +216,7 @@ void OptimizingCompilerThread::InstallOptimizedFunctions() {
HandleScope handle_scope(isolate_);
RecompileJob* job;
- while (true) {
- { LockGuard<Mutex> access_queue(&queue_mutex_);
- if (!output_queue_.Dequeue(&job)) break;
- }
+ while (output_queue_.Dequeue(&job)) {
CompilationInfo* info = job->info();
if (info->is_osr()) {
if (FLAG_trace_osr) {
« no previous file with comments | « src/optimizing-compiler-thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698