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

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: make new counters non-histograms Created 8 years 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-utils.cc ('k') | src/profile-generator-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 // 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 Logger::TimerEventScope timer(
52 isolate_->logger(), Logger::TimerEventScope::v8_recompile_parallel);
51 if (Acquire_Load(&stop_thread_)) { 53 if (Acquire_Load(&stop_thread_)) {
52 stop_semaphore_->Signal(); 54 stop_semaphore_->Signal();
53 if (FLAG_trace_parallel_recompilation) { 55 if (FLAG_trace_parallel_recompilation) {
54 time_spent_total_ = OS::Ticks() - epoch; 56 time_spent_total_ = OS::Ticks() - epoch;
55 } 57 }
56 return; 58 return;
57 } 59 }
58 60
59 int64_t compiling_start = 0; 61 int64_t compiling_start = 0;
60 if (FLAG_trace_parallel_recompilation) compiling_start = OS::Ticks(); 62 if (FLAG_trace_parallel_recompilation) compiling_start = OS::Ticks();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 140
139 #ifdef DEBUG 141 #ifdef DEBUG
140 bool OptimizingCompilerThread::IsOptimizerThread() { 142 bool OptimizingCompilerThread::IsOptimizerThread() {
141 if (!FLAG_parallel_recompilation) return false; 143 if (!FLAG_parallel_recompilation) return false;
142 return ThreadId::Current().ToInteger() == thread_id_; 144 return ThreadId::Current().ToInteger() == thread_id_;
143 } 145 }
144 #endif 146 #endif
145 147
146 148
147 } } // namespace v8::internal 149 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log-utils.cc ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698