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

Unified Diff: src/compiler.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/compiler.h ('k') | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 93898b18c52e528f47353377b6505e9b5faf9e9d..6c2bdce26f9a2540adf5a66484d51103afc91628 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -260,9 +260,10 @@ void OptimizingCompiler::RecordOptimizationStats() {
Handle<JSFunction> function = info()->closure();
int opt_count = function->shared()->opt_count();
function->shared()->set_opt_count(opt_count + 1);
- double ms_creategraph = time_taken_to_create_graph_.InMillisecondsF();
- double ms_optimize = time_taken_to_optimize_.InMillisecondsF();
- double ms_codegen = time_taken_to_codegen_.InMillisecondsF();
+ double ms_creategraph =
+ static_cast<double>(time_taken_to_create_graph_) / 1000;
+ double ms_optimize = static_cast<double>(time_taken_to_optimize_) / 1000;
+ double ms_codegen = static_cast<double>(time_taken_to_codegen_) / 1000;
if (FLAG_trace_opt) {
PrintF("[optimizing ");
function->ShortPrint();
@@ -372,9 +373,9 @@ OptimizingCompiler::Status OptimizingCompiler::CreateGraph() {
// performance of the hydrogen-based compiler.
bool should_recompile = !info()->shared_info()->has_deoptimization_support();
if (should_recompile || FLAG_hydrogen_stats) {
- ElapsedTimer timer;
+ int64_t start_ticks = 0;
if (FLAG_hydrogen_stats) {
- timer.Start();
+ start_ticks = OS::Ticks();
}
CompilationInfoWithZone unoptimized(info()->shared_info());
// Note that we use the same AST that we will use for generating the
@@ -393,7 +394,8 @@ OptimizingCompiler::Status OptimizingCompiler::CreateGraph() {
Logger::LAZY_COMPILE_TAG, &unoptimized, shared);
}
if (FLAG_hydrogen_stats) {
- isolate()->GetHStatistics()->IncrementFullCodeGen(timer.Elapsed());
+ int64_t ticks = OS::Ticks() - start_ticks;
+ isolate()->GetHStatistics()->IncrementFullCodeGen(ticks);
}
}
@@ -1242,7 +1244,7 @@ CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info)
: name_(name), info_(info), zone_(info->isolate()) {
if (FLAG_hydrogen_stats) {
info_zone_start_allocation_size_ = info->zone()->allocation_size();
- timer_.Start();
+ start_ticks_ = OS::Ticks();
}
}
@@ -1251,7 +1253,8 @@ CompilationPhase::~CompilationPhase() {
if (FLAG_hydrogen_stats) {
unsigned size = zone()->allocation_size();
size += info_->zone()->allocation_size() - info_zone_start_allocation_size_;
- isolate()->GetHStatistics()->SaveTiming(name_, timer_.Elapsed(), size);
+ int64_t ticks = OS::Ticks() - start_ticks_;
+ isolate()->GetHStatistics()->SaveTiming(name_, ticks, size);
}
}
« no previous file with comments | « src/compiler.h ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698