| Index: runtime/vm/compiler_stats.cc
|
| diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
|
| index 78a1ad7bb8ddaa6037808e7f44b536a9dfd96550..bad80f9d130ac7f217498d13a094389185b2d21d 100644
|
| --- a/runtime/vm/compiler_stats.cc
|
| +++ b/runtime/vm/compiler_stats.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -30,6 +30,22 @@ Timer CompilerStats::codegen_timer(true, "codegen timer");
|
| // Cumulative timer of flow graph builder, included in codegen_timer.
|
| Timer CompilerStats::graphbuilder_timer(true, "flow graph builder timer");
|
|
|
| +// Cumulative timer of flow graph SSA construction, included in codegen_timer.
|
| +Timer CompilerStats::graphssa_timer(true, "flow graph SSA timer");
|
| +
|
| +// Cumulative timer of flow graph inliner, included in codegen_timer.
|
| +Timer CompilerStats::graphinliner_timer(true, "flow graph inliner timer");
|
| +// Cumulative sub-timers of flow graph inliner.
|
| +Timer CompilerStats::graphinliner_parse_timer(true, "inliner parsing timer");
|
| +Timer CompilerStats::graphinliner_build_timer(true, "inliner building timer");
|
| +Timer CompilerStats::graphinliner_ssa_timer(true, "inliner SSA timer");
|
| +Timer CompilerStats::graphinliner_opt_timer(true, "inliner optimization timer");
|
| +Timer CompilerStats::graphinliner_subst_timer(true,
|
| + "inliner substitution timer");
|
| +
|
| +// Cumulative timer of flow graph optimizer, included in codegen_timer.
|
| +Timer CompilerStats::graphoptimizer_timer(true, "flow graph optimizer timer");
|
| +
|
| // Cumulative timer of flow graph compiler, included in codegen_timer.
|
| Timer CompilerStats::graphcompiler_timer(true, "flow graph compiler timer");
|
|
|
| @@ -74,12 +90,39 @@ void CompilerStats::Print() {
|
| OS::Print("Code gen. time: %"Pd64" msecs\n",
|
| codegen_usecs / 1000);
|
| int64_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime();
|
| - OS::Print(" Graph builder time: %"Pd64" msecs\n", graphbuilder_usecs / 1000);
|
| + OS::Print(" Graph builder: %"Pd64" msecs\n", graphbuilder_usecs / 1000);
|
| + int64_t graphssa_usecs = graphssa_timer.TotalElapsedTime();
|
| + OS::Print(" Graph SSA: %"Pd64" msecs\n", graphssa_usecs / 1000);
|
| +
|
| + int64_t graphinliner_usecs = graphinliner_timer.TotalElapsedTime();
|
| + OS::Print(" Graph inliner: %"Pd64" msecs\n", graphinliner_usecs / 1000);
|
| + int64_t graphinliner_parse_usecs =
|
| + graphinliner_parse_timer.TotalElapsedTime();
|
| + OS::Print(" Parsing: %"Pd64" msecs\n",
|
| + graphinliner_parse_usecs / 1000);
|
| + int64_t graphinliner_build_usecs =
|
| + graphinliner_build_timer.TotalElapsedTime();
|
| + OS::Print(" Building: %"Pd64" msecs\n",
|
| + graphinliner_build_usecs / 1000);
|
| + int64_t graphinliner_ssa_usecs = graphinliner_ssa_timer.TotalElapsedTime();
|
| + OS::Print(" SSA: %"Pd64" msecs\n",
|
| + graphinliner_ssa_usecs / 1000);
|
| + int64_t graphinliner_opt_usecs = graphinliner_opt_timer.TotalElapsedTime();
|
| + OS::Print(" Optimization: %"Pd64" msecs\n",
|
| + graphinliner_opt_usecs / 1000);
|
| + int64_t graphinliner_subst_usecs =
|
| + graphinliner_subst_timer.TotalElapsedTime();
|
| + OS::Print(" Substitution: %"Pd64" msecs\n",
|
| + graphinliner_subst_usecs / 1000);
|
| +
|
| + int64_t graphoptimizer_usecs = graphoptimizer_timer.TotalElapsedTime();
|
| + OS::Print(" Graph optimizer: %"Pd64" msecs\n",
|
| + (graphoptimizer_usecs - graphinliner_usecs) / 1000);
|
| int64_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime();
|
| - OS::Print(" Graph comp. time: %"Pd64" msecs\n",
|
| + OS::Print(" Graph compiler: %"Pd64" msecs\n",
|
| graphcompiler_usecs / 1000);
|
| int64_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime();
|
| - OS::Print(" Code final. time: %"Pd64" msecs\n",
|
| + OS::Print(" Code finalizer: %"Pd64" msecs\n",
|
| codefinalizer_usecs / 1000);
|
| OS::Print("Compilation speed: %"Pd64" tokens per msec\n",
|
| 1000 * num_tokens_total / (parse_usecs + codegen_usecs));
|
|
|