Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 7d5fd930f844de4a632cdfcdae5c0810f925cd14..2539f7d7d276524b853e319ac53448451ba56ccf 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -367,7 +367,10 @@ 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) { |
- HPhase phase(HPhase::kFullCodeGen, isolate(), info()->zone()); |
+ int64_t start_ticks = 0; |
+ if (FLAG_hydrogen_stats) { |
+ start_ticks = OS::Ticks(); |
+ } |
CompilationInfoWithZone unoptimized(info()->shared_info()); |
// Note that we use the same AST that we will use for generating the |
// optimized code. |
@@ -384,6 +387,10 @@ OptimizingCompiler::Status OptimizingCompiler::CreateGraph() { |
Compiler::RecordFunctionCompilation( |
Logger::LAZY_COMPILE_TAG, &unoptimized, shared); |
} |
+ if (FLAG_hydrogen_stats) { |
+ int64_t ticks = OS::Ticks() - start_ticks; |
+ isolate()->GetHStatistics()->IncrementFullCodeGen(ticks); |
+ } |
} |
// Check that the unoptimized, shared code is ready for |