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

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

Issue 11412125: Add parallel recompilation time to histogram and plot execution pause times. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: moar timers Created 8 years, 1 month 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 30 matching lines...) Expand all
41 #ifdef DEBUG 41 #ifdef DEBUG
42 thread_id_ = ThreadId::Current().ToInteger(); 42 thread_id_ = ThreadId::Current().ToInteger();
43 #endif 43 #endif
44 Isolate::SetIsolateThreadLocals(isolate_, NULL); 44 Isolate::SetIsolateThreadLocals(isolate_, NULL);
45 45
46 int64_t epoch = 0; 46 int64_t epoch = 0;
47 if (FLAG_trace_parallel_recompilation) epoch = OS::Ticks(); 47 if (FLAG_trace_parallel_recompilation) epoch = OS::Ticks();
48 48
49 while (true) { 49 while (true) {
50 input_queue_semaphore_->Wait(); 50 input_queue_semaphore_->Wait();
51 HistogramTimerScope timer(isolate_->counters()->recompile_parallel());
51 if (Acquire_Load(&stop_thread_)) { 52 if (Acquire_Load(&stop_thread_)) {
52 stop_semaphore_->Signal(); 53 stop_semaphore_->Signal();
53 if (FLAG_trace_parallel_recompilation) { 54 if (FLAG_trace_parallel_recompilation) {
54 time_spent_total_ = OS::Ticks() - epoch; 55 time_spent_total_ = OS::Ticks() - epoch;
55 } 56 }
56 return; 57 return;
57 } 58 }
58 59
59 int64_t compiling_start = 0; 60 int64_t compiling_start = 0;
60 if (FLAG_trace_parallel_recompilation) compiling_start = OS::Ticks(); 61 if (FLAG_trace_parallel_recompilation) compiling_start = OS::Ticks();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 139
139 #ifdef DEBUG 140 #ifdef DEBUG
140 bool OptimizingCompilerThread::IsOptimizerThread() { 141 bool OptimizingCompilerThread::IsOptimizerThread() {
141 if (!FLAG_parallel_recompilation) return false; 142 if (!FLAG_parallel_recompilation) return false;
142 return ThreadId::Current().ToInteger() == thread_id_; 143 return ThreadId::Current().ToInteger() == thread_id_;
143 } 144 }
144 #endif 145 #endif
145 146
146 147
147 } } // namespace v8::internal 148 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698