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

Unified Diff: src/compiler.cc

Issue 17590005: Drop (mis)use of HPhase in full code gen. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Fix GCC warning about uninitialized start_ticks variable. Created 7 years, 6 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 | « no previous file | src/hydrogen.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 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
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698