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

Side by Side Diff: runtime/vm/compiler_stats.cc

Issue 11236063: Restructure code generation timers and add sub-timers for inlining phases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Include and declare Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/compiler_stats.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler_stats.h" 5 #include "vm/compiler_stats.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/timer.h" 8 #include "vm/timer.h"
9 9
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 // Cumulative runtime of scanner. 24 // Cumulative runtime of scanner.
25 Timer CompilerStats::scanner_timer(true, "scanner timer"); 25 Timer CompilerStats::scanner_timer(true, "scanner timer");
26 26
27 // Cumulative runtime of code generator. 27 // Cumulative runtime of code generator.
28 Timer CompilerStats::codegen_timer(true, "codegen timer"); 28 Timer CompilerStats::codegen_timer(true, "codegen timer");
29 29
30 // Cumulative timer of flow graph builder, included in codegen_timer. 30 // Cumulative timer of flow graph builder, included in codegen_timer.
31 Timer CompilerStats::graphbuilder_timer(true, "flow graph builder timer"); 31 Timer CompilerStats::graphbuilder_timer(true, "flow graph builder timer");
32 32
33 // Cumulative timer of flow graph SSA construction, included in codegen_timer.
34 Timer CompilerStats::ssa_timer(true, "flow graph SSA timer");
35
36 // Cumulative timer of flow graph inliner, included in codegen_timer.
37 Timer CompilerStats::graphinliner_timer(true, "flow graph inliner timer");
38 // Cumulative sub-timers of flow graph inliner.
39 Timer CompilerStats::graphinliner_parse_timer(true, "inliner parsing timer");
40 Timer CompilerStats::graphinliner_build_timer(true, "inliner building timer");
41 Timer CompilerStats::graphinliner_ssa_timer(true, "inliner SSA timer");
42 Timer CompilerStats::graphinliner_opt_timer(true, "inliner optimization timer");
43 Timer CompilerStats::graphinliner_subst_timer(true,
44 "inliner substitution timer");
45
46 // Cumulative timer of flow graph optimizer, included in codegen_timer.
47 Timer CompilerStats::graphoptimizer_timer(true, "flow graph optimizer timer");
48
33 // Cumulative timer of flow graph compiler, included in codegen_timer. 49 // Cumulative timer of flow graph compiler, included in codegen_timer.
34 Timer CompilerStats::graphcompiler_timer(true, "flow graph compiler timer"); 50 Timer CompilerStats::graphcompiler_timer(true, "flow graph compiler timer");
35 51
36 // Cumulative timer of code finalization, included in codegen_timer. 52 // Cumulative timer of code finalization, included in codegen_timer.
37 Timer CompilerStats::codefinalizer_timer(true, "code finalization timer"); 53 Timer CompilerStats::codefinalizer_timer(true, "code finalization timer");
38 54
39 55
40 intptr_t CompilerStats::num_tokens_total = 0; 56 intptr_t CompilerStats::num_tokens_total = 0;
41 intptr_t CompilerStats::num_literal_tokens_total = 0; 57 intptr_t CompilerStats::num_literal_tokens_total = 0;
42 intptr_t CompilerStats::num_ident_tokens_total = 0; 58 intptr_t CompilerStats::num_ident_tokens_total = 0;
(...skipping 24 matching lines...) Expand all
67 int64_t scan_usecs = scanner_timer.TotalElapsedTime(); 83 int64_t scan_usecs = scanner_timer.TotalElapsedTime();
68 OS::Print("Scanner time: %"Pd64" msecs\n", 84 OS::Print("Scanner time: %"Pd64" msecs\n",
69 scan_usecs / 1000); 85 scan_usecs / 1000);
70 int64_t parse_usecs = parser_timer.TotalElapsedTime(); 86 int64_t parse_usecs = parser_timer.TotalElapsedTime();
71 OS::Print("Parser time: %"Pd64" msecs\n", 87 OS::Print("Parser time: %"Pd64" msecs\n",
72 parse_usecs / 1000); 88 parse_usecs / 1000);
73 int64_t codegen_usecs = codegen_timer.TotalElapsedTime(); 89 int64_t codegen_usecs = codegen_timer.TotalElapsedTime();
74 OS::Print("Code gen. time: %"Pd64" msecs\n", 90 OS::Print("Code gen. time: %"Pd64" msecs\n",
75 codegen_usecs / 1000); 91 codegen_usecs / 1000);
76 int64_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime(); 92 int64_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime();
77 OS::Print(" Graph builder time: %"Pd64" msecs\n", graphbuilder_usecs / 1000); 93 OS::Print(" Graph builder: %"Pd64" msecs\n", graphbuilder_usecs / 1000);
94 int64_t ssa_usecs = ssa_timer.TotalElapsedTime();
95 OS::Print(" Graph SSA: %"Pd64" msecs\n", ssa_usecs / 1000);
96
97 int64_t graphinliner_usecs = graphinliner_timer.TotalElapsedTime();
98 OS::Print(" Graph inliner: %"Pd64" msecs\n", graphinliner_usecs / 1000);
99 int64_t graphinliner_parse_usecs =
100 graphinliner_parse_timer.TotalElapsedTime();
101 OS::Print(" Parsing: %"Pd64" msecs\n",
102 graphinliner_parse_usecs / 1000);
103 int64_t graphinliner_build_usecs =
104 graphinliner_build_timer.TotalElapsedTime();
105 OS::Print(" Building: %"Pd64" msecs\n",
106 graphinliner_build_usecs / 1000);
107 int64_t graphinliner_ssa_usecs = graphinliner_ssa_timer.TotalElapsedTime();
108 OS::Print(" SSA: %"Pd64" msecs\n",
109 graphinliner_ssa_usecs / 1000);
110 int64_t graphinliner_opt_usecs = graphinliner_opt_timer.TotalElapsedTime();
111 OS::Print(" Optimization: %"Pd64" msecs\n",
112 graphinliner_opt_usecs / 1000);
113 int64_t graphinliner_subst_usecs =
114 graphinliner_subst_timer.TotalElapsedTime();
115 OS::Print(" Substitution: %"Pd64" msecs\n",
116 graphinliner_subst_usecs / 1000);
117
118 int64_t graphoptimizer_usecs = graphoptimizer_timer.TotalElapsedTime();
119 OS::Print(" Graph optimizer: %"Pd64" msecs\n",
120 (graphoptimizer_usecs - graphinliner_usecs) / 1000);
78 int64_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime(); 121 int64_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime();
79 OS::Print(" Graph comp. time: %"Pd64" msecs\n", 122 OS::Print(" Graph compiler: %"Pd64" msecs\n",
80 graphcompiler_usecs / 1000); 123 graphcompiler_usecs / 1000);
81 int64_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime(); 124 int64_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime();
82 OS::Print(" Code final. time: %"Pd64" msecs\n", 125 OS::Print(" Code finalizer: %"Pd64" msecs\n",
83 codefinalizer_usecs / 1000); 126 codefinalizer_usecs / 1000);
84 OS::Print("Compilation speed: %"Pd64" tokens per msec\n", 127 OS::Print("Compilation speed: %"Pd64" tokens per msec\n",
85 1000 * num_tokens_total / (parse_usecs + codegen_usecs)); 128 1000 * num_tokens_total / (parse_usecs + codegen_usecs));
86 OS::Print("Code size: %"Pd" KB\n", 129 OS::Print("Code size: %"Pd" KB\n",
87 code_allocated / 1024); 130 code_allocated / 1024);
88 OS::Print("Code density: %"Pd" tokens per KB\n", 131 OS::Print("Code density: %"Pd" tokens per KB\n",
89 num_tokens_total * 1024 / code_allocated); 132 num_tokens_total * 1024 / code_allocated);
90 } 133 }
91 134
92 } // namespace dart 135 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler_stats.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698