Commit f5e783de authored by yangguo@chromium.org's avatar yangguo@chromium.org

Remove unnecessary mutex.

The heap leak has since been solved.

R=mstarzinger@chromium.org
BUG=291236

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 81557f21
...@@ -108,7 +108,6 @@ void OptimizingCompilerThread::CompileNext() { ...@@ -108,7 +108,6 @@ void OptimizingCompilerThread::CompileNext() {
// The function may have already been optimized by OSR. Simply continue. // The function may have already been optimized by OSR. Simply continue.
// Use a mutex to make sure that functions marked for install // Use a mutex to make sure that functions marked for install
// are always also queued. // are always also queued.
LockGuard<Mutex> access_queue(&queue_mutex_);
output_queue_.Enqueue(job); output_queue_.Enqueue(job);
isolate_->stack_guard()->RequestInstallCode(); isolate_->stack_guard()->RequestInstallCode();
} }
...@@ -147,10 +146,7 @@ void OptimizingCompilerThread::FlushInputQueue(bool restore_function_code) { ...@@ -147,10 +146,7 @@ void OptimizingCompilerThread::FlushInputQueue(bool restore_function_code) {
void OptimizingCompilerThread::FlushOutputQueue(bool restore_function_code) { void OptimizingCompilerThread::FlushOutputQueue(bool restore_function_code) {
RecompileJob* job; RecompileJob* job;
while (true) { while (output_queue_.Dequeue(&job)) {
{ LockGuard<Mutex> access_queue(&queue_mutex_);
if (!output_queue_.Dequeue(&job)) break;
}
// OSR jobs are dealt with separately. // OSR jobs are dealt with separately.
if (!job->info()->is_osr()) { if (!job->info()->is_osr()) {
DisposeRecompileJob(job, restore_function_code); DisposeRecompileJob(job, restore_function_code);
...@@ -220,10 +216,7 @@ void OptimizingCompilerThread::InstallOptimizedFunctions() { ...@@ -220,10 +216,7 @@ void OptimizingCompilerThread::InstallOptimizedFunctions() {
HandleScope handle_scope(isolate_); HandleScope handle_scope(isolate_);
RecompileJob* job; RecompileJob* job;
while (true) { while (output_queue_.Dequeue(&job)) {
{ LockGuard<Mutex> access_queue(&queue_mutex_);
if (!output_queue_.Dequeue(&job)) break;
}
CompilationInfo* info = job->info(); CompilationInfo* info = job->info();
if (info->is_osr()) { if (info->is_osr()) {
if (FLAG_trace_osr) { if (FLAG_trace_osr) {
......
...@@ -139,8 +139,6 @@ class OptimizingCompilerThread : public Thread { ...@@ -139,8 +139,6 @@ class OptimizingCompilerThread : public Thread {
TimeDelta time_spent_compiling_; TimeDelta time_spent_compiling_;
TimeDelta time_spent_total_; TimeDelta time_spent_total_;
// TODO(yangguo): remove this once the memory leak has been figured out.
Mutex queue_mutex_;
int osr_hits_; int osr_hits_;
int osr_attempts_; int osr_attempts_;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment