OLD | NEW |
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/object_graph.h" | 8 #include "vm/object_graph.h" |
9 #include "vm/timer.h" | 9 #include "vm/timer.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 graphinliner_subst_timer(true, "inliner substitution timer"), | 66 graphinliner_subst_timer(true, "inliner substitution timer"), |
67 graphoptimizer_timer(true, "flow graph optimizer timer"), | 67 graphoptimizer_timer(true, "flow graph optimizer timer"), |
68 graphcompiler_timer(true, "flow graph compiler timer"), | 68 graphcompiler_timer(true, "flow graph compiler timer"), |
69 codefinalizer_timer(true, "code finalization timer"), | 69 codefinalizer_timer(true, "code finalization timer"), |
70 num_tokens_total(0), | 70 num_tokens_total(0), |
71 num_literal_tokens_total(0), | 71 num_literal_tokens_total(0), |
72 num_ident_tokens_total(0), | 72 num_ident_tokens_total(0), |
73 num_tokens_consumed(0), | 73 num_tokens_consumed(0), |
74 num_token_checks(0), | 74 num_token_checks(0), |
75 num_tokens_lookahead(0), | 75 num_tokens_lookahead(0), |
| 76 num_cached_consts(0), |
| 77 num_const_cache_hits(0), |
76 num_classes_compiled(0), | 78 num_classes_compiled(0), |
77 num_functions_compiled(0), | 79 num_functions_compiled(0), |
78 num_implicit_final_getters(0), | 80 num_implicit_final_getters(0), |
79 src_length(0), | 81 src_length(0), |
80 total_code_size(0), | 82 total_code_size(0), |
81 total_instr_size(0), | 83 total_instr_size(0), |
82 pc_desc_size(0), | 84 pc_desc_size(0), |
83 vardesc_size(0) { | 85 vardesc_size(0) { |
84 } | 86 } |
85 | 87 |
(...skipping 18 matching lines...) Expand all Loading... |
104 OS::Print(" Literal tokens: %" Pd64 "\n", num_literal_tokens_total); | 106 OS::Print(" Literal tokens: %" Pd64 "\n", num_literal_tokens_total); |
105 OS::Print(" Ident tokens: %" Pd64 "\n", num_ident_tokens_total); | 107 OS::Print(" Ident tokens: %" Pd64 "\n", num_ident_tokens_total); |
106 OS::Print("Tokens consumed: %" Pd64 " (%.2f times number of tokens)\n", | 108 OS::Print("Tokens consumed: %" Pd64 " (%.2f times number of tokens)\n", |
107 num_tokens_consumed, | 109 num_tokens_consumed, |
108 (1.0 * num_tokens_consumed) / num_tokens_total); | 110 (1.0 * num_tokens_consumed) / num_tokens_total); |
109 OS::Print("Tokens checked: %" Pd64 " (%.2f times tokens consumed)\n", | 111 OS::Print("Tokens checked: %" Pd64 " (%.2f times tokens consumed)\n", |
110 num_token_checks, (1.0 * num_token_checks) / num_tokens_consumed); | 112 num_token_checks, (1.0 * num_token_checks) / num_tokens_consumed); |
111 OS::Print("Token lookahead: %" Pd64 " (%" Pd64 "%% of tokens checked)\n", | 113 OS::Print("Token lookahead: %" Pd64 " (%" Pd64 "%% of tokens checked)\n", |
112 num_tokens_lookahead, | 114 num_tokens_lookahead, |
113 (100 * num_tokens_lookahead) / num_token_checks); | 115 (100 * num_tokens_lookahead) / num_token_checks); |
| 116 OS::Print("Consts cached: %" Pd64 "\n", num_cached_consts); |
| 117 OS::Print("Consts cache hits: %" Pd64 "\n", num_const_cache_hits); |
114 | 118 |
115 OS::Print("Classes parsed: %" Pd64 "\n", num_classes_compiled); | 119 OS::Print("Classes parsed: %" Pd64 "\n", num_classes_compiled); |
116 OS::Print("Functions compiled: %" Pd64 "\n", num_functions_compiled); | 120 OS::Print("Functions compiled: %" Pd64 "\n", num_functions_compiled); |
117 OS::Print(" Impl getters: %" Pd64 "\n", num_implicit_final_getters); | 121 OS::Print(" Impl getters: %" Pd64 "\n", num_implicit_final_getters); |
118 | 122 |
119 OS::Print("Source length: %" Pd64 " characters\n", src_length); | 123 OS::Print("Source length: %" Pd64 " characters\n", src_length); |
120 int64_t scan_usecs = scanner_timer.TotalElapsedTime(); | 124 int64_t scan_usecs = scanner_timer.TotalElapsedTime(); |
121 OS::Print("Scanner time: %" Pd64 " msecs\n", | 125 OS::Print("Scanner time: %" Pd64 " msecs\n", |
122 scan_usecs / 1000); | 126 scan_usecs / 1000); |
123 int64_t parse_usecs = parser_timer.TotalElapsedTime(); | 127 int64_t parse_usecs = parser_timer.TotalElapsedTime(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 (num_tokens_total * 1024) / total_instr_size); | 171 (num_tokens_total * 1024) / total_instr_size); |
168 OS::Print("Instr size: %" Pd64 " KB\n", | 172 OS::Print("Instr size: %" Pd64 " KB\n", |
169 total_instr_size / 1024); | 173 total_instr_size / 1024); |
170 OS::Print("Pc Desc size: %" Pd64 " KB\n", pc_desc_size / 1024); | 174 OS::Print("Pc Desc size: %" Pd64 " KB\n", pc_desc_size / 1024); |
171 OS::Print("VarDesc size: %" Pd64 " KB\n", vardesc_size / 1024); | 175 OS::Print("VarDesc size: %" Pd64 " KB\n", vardesc_size / 1024); |
172 | 176 |
173 OS::Print("Code size: %" Pd64 " KB\n", total_code_size / 1024); | 177 OS::Print("Code size: %" Pd64 " KB\n", total_code_size / 1024); |
174 } | 178 } |
175 | 179 |
176 } // namespace dart | 180 } // namespace dart |
OLD | NEW |