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

Side by Side Diff: src/optimizing-compiler-thread.cc

Issue 388783004: Do not expose all timer events to the API callback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/log.cc ('k') | src/vm-state-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/optimizing-compiler-thread.h" 5 #include "src/optimizing-compiler-thread.h"
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/full-codegen.h" 10 #include "src/full-codegen.h"
(...skipping 27 matching lines...) Expand all
38 Isolate::SetIsolateThreadLocals(isolate_, NULL); 38 Isolate::SetIsolateThreadLocals(isolate_, NULL);
39 DisallowHeapAllocation no_allocation; 39 DisallowHeapAllocation no_allocation;
40 DisallowHandleAllocation no_handles; 40 DisallowHandleAllocation no_handles;
41 DisallowHandleDereference no_deref; 41 DisallowHandleDereference no_deref;
42 42
43 base::ElapsedTimer total_timer; 43 base::ElapsedTimer total_timer;
44 if (FLAG_trace_concurrent_recompilation) total_timer.Start(); 44 if (FLAG_trace_concurrent_recompilation) total_timer.Start();
45 45
46 while (true) { 46 while (true) {
47 input_queue_semaphore_.Wait(); 47 input_queue_semaphore_.Wait();
48 Logger::TimerEventScope timer( 48 TimerEventScope<TimerEventRecompileConcurrent> timer(isolate_);
49 isolate_, Logger::TimerEventScope::v8_recompile_concurrent);
50 49
51 if (FLAG_concurrent_recompilation_delay != 0) { 50 if (FLAG_concurrent_recompilation_delay != 0) {
52 base::OS::Sleep(FLAG_concurrent_recompilation_delay); 51 base::OS::Sleep(FLAG_concurrent_recompilation_delay);
53 } 52 }
54 53
55 switch (static_cast<StopFlag>(base::Acquire_Load(&stop_thread_))) { 54 switch (static_cast<StopFlag>(base::Acquire_Load(&stop_thread_))) {
56 case CONTINUE: 55 case CONTINUE:
57 break; 56 break;
58 case STOP: 57 case STOP:
59 if (FLAG_trace_concurrent_recompilation) { 58 if (FLAG_trace_concurrent_recompilation) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 363
365 364
366 bool OptimizingCompilerThread::IsOptimizerThread() { 365 bool OptimizingCompilerThread::IsOptimizerThread() {
367 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_); 366 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_);
368 return ThreadId::Current().ToInteger() == thread_id_; 367 return ThreadId::Current().ToInteger() == thread_id_;
369 } 368 }
370 #endif 369 #endif
371 370
372 371
373 } } // namespace v8::internal 372 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/vm-state-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698