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

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

Issue 23710002: Revert "Cross-compiling from Linux to Android requires -lrt for the host toolset.", "Fix Visual Stu… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « src/optimizing-compiler-thread.h ('k') | src/parser.cc » ('j') | 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 added3388215d95dabdc549881f8dcf9d98d3813..788f0270611eb913300e8877c02c1d172505da57 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -48,8 +48,8 @@ void OptimizingCompilerThread::Run() {
DisallowHandleAllocation no_handles;
DisallowHandleDereference no_deref;
- ElapsedTimer total_timer;
- if (FLAG_trace_concurrent_recompilation) total_timer.Start();
+ int64_t epoch = 0;
+ if (FLAG_trace_concurrent_recompilation) epoch = OS::Ticks();
while (true) {
input_queue_semaphore_->Wait();
@@ -65,7 +65,7 @@ void OptimizingCompilerThread::Run() {
break;
case STOP:
if (FLAG_trace_concurrent_recompilation) {
- time_spent_total_ = total_timer.Elapsed();
+ time_spent_total_ = OS::Ticks() - epoch;
}
stop_semaphore_->Signal();
return;
@@ -81,13 +81,13 @@ void OptimizingCompilerThread::Run() {
continue;
}
- ElapsedTimer compiling_timer;
- if (FLAG_trace_concurrent_recompilation) compiling_timer.Start();
+ int64_t compiling_start = 0;
+ if (FLAG_trace_concurrent_recompilation) compiling_start = OS::Ticks();
CompileNext();
if (FLAG_trace_concurrent_recompilation) {
- time_spent_compiling_ += compiling_timer.Elapsed();
+ time_spent_compiling_ += OS::Ticks() - compiling_start;
}
}
}
@@ -175,7 +175,9 @@ void OptimizingCompilerThread::Stop() {
}
if (FLAG_trace_concurrent_recompilation) {
- double percentage = time_spent_compiling_.PercentOf(time_spent_total_);
+ double compile_time = static_cast<double>(time_spent_compiling_);
+ double total_time = static_cast<double>(time_spent_total_);
+ double percentage = (compile_time * 100) / total_time;
PrintF(" ** Compiler thread did %.2f%% useful work\n", percentage);
}
« no previous file with comments | « src/optimizing-compiler-thread.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698