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

Unified Diff: runtime/vm/compiler_stats.cc

Issue 10084014: Measure code generation time as well. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler_stats.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_stats.cc
===================================================================
--- runtime/vm/compiler_stats.cc (revision 6532)
+++ runtime/vm/compiler_stats.cc (working copy)
@@ -24,6 +24,9 @@
// Cumulative runtime of scanner.
Timer CompilerStats::scanner_timer(true, "scanner timer");
+// Cumulative runtime of code generator.
+Timer CompilerStats::codegen_timer(true, "codegen timer");
+
intptr_t CompilerStats::num_tokens_total = 0;
intptr_t CompilerStats::num_literal_tokens_total = 0;
intptr_t CompilerStats::num_ident_tokens_total = 0;
@@ -55,10 +58,13 @@
OS::Print("Scanner time: %ld msecs\n",
scan_usecs / 1000);
intptr_t parse_usecs = parser_timer.TotalElapsedTime();
- OS::Print("Compilation time: %ld msecs\n",
+ OS::Print("Parser time: %ld msecs\n",
parse_usecs / 1000);
+ intptr_t codegen_usecs = codegen_timer.TotalElapsedTime();
+ OS::Print("Code gen. time: %ld msecs\n",
+ codegen_usecs / 1000);
OS::Print("Compilation speed: %ld tokens per msec\n",
- 1000 * num_tokens_total / parse_usecs);
+ 1000 * num_tokens_total / (parse_usecs + codegen_usecs));
OS::Print("Code size: %ld KB\n",
code_allocated / 1024);
OS::Print("Code density: %ld tokens per KB\n",
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler_stats.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698