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

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

Issue 836413005: Make sure that the TimerEventScope is destroyed before we signal completion (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 11 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 | « no previous file | 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 6926f47ef29e4dda1c57ca5cf7e4b75e81971d04..ed1e56acd5ee0d363f5674fdb86a4f4bd3e598c1 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -53,25 +53,28 @@ class OptimizingCompilerThread::CompileTask : public v8::Task {
DisallowHandleAllocation no_handles;
DisallowHandleDereference no_deref;
- TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
-
OptimizingCompilerThread* thread = isolate_->optimizing_compiler_thread();
- if (thread->recompilation_delay_ != 0) {
- base::OS::Sleep(thread->recompilation_delay_);
- }
+ {
+ TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
+
+ if (thread->recompilation_delay_ != 0) {
+ base::OS::Sleep(thread->recompilation_delay_);
+ }
- StopFlag flag;
- OptimizedCompileJob* job = thread->NextInput(&flag);
+ StopFlag flag;
+ OptimizedCompileJob* job = thread->NextInput(&flag);
- if (flag == CONTINUE) {
- thread->CompileNext(job);
- } else {
- AllowHandleDereference allow_handle_dereference;
- if (!job->info()->is_osr()) {
- DisposeOptimizedCompileJob(job, true);
+ if (flag == CONTINUE) {
+ thread->CompileNext(job);
+ } else {
+ AllowHandleDereference allow_handle_dereference;
+ if (!job->info()->is_osr()) {
+ DisposeOptimizedCompileJob(job, true);
+ }
}
}
+
bool signal = false;
{
base::LockGuard<base::RecursiveMutex> lock(&thread->task_count_mutex_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698