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 #ifndef VM_COMPILER_STATS_H_ | 5 #ifndef VM_COMPILER_STATS_H_ |
6 #define VM_COMPILER_STATS_H_ | 6 #define VM_COMPILER_STATS_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 Timer graphoptimizer_timer; // Included in codegen_timer. | 43 Timer graphoptimizer_timer; // Included in codegen_timer. |
44 Timer graphcompiler_timer; // Included in codegen_timer. | 44 Timer graphcompiler_timer; // Included in codegen_timer. |
45 Timer codefinalizer_timer; // Included in codegen_timer. | 45 Timer codefinalizer_timer; // Included in codegen_timer. |
46 | 46 |
47 int64_t num_tokens_total; | 47 int64_t num_tokens_total; |
48 int64_t num_literal_tokens_total; | 48 int64_t num_literal_tokens_total; |
49 int64_t num_ident_tokens_total; | 49 int64_t num_ident_tokens_total; |
50 int64_t num_tokens_consumed; | 50 int64_t num_tokens_consumed; |
51 int64_t num_token_checks; | 51 int64_t num_token_checks; |
52 int64_t num_tokens_lookahead; | 52 int64_t num_tokens_lookahead; |
| 53 int64_t num_cached_consts; |
| 54 int64_t num_const_cache_hits; |
53 | 55 |
54 int64_t num_classes_compiled; | 56 int64_t num_classes_compiled; |
55 int64_t num_functions_compiled; | 57 int64_t num_functions_compiled; |
56 int64_t num_implicit_final_getters; | 58 int64_t num_implicit_final_getters; |
57 | 59 |
58 int64_t src_length; // Total number of characters in source. | 60 int64_t src_length; // Total number of characters in source. |
59 int64_t total_code_size; // Bytes allocated for code and meta info. | 61 int64_t total_code_size; // Bytes allocated for code and meta info. |
60 int64_t total_instr_size; // Total size of generated code in bytes. | 62 int64_t total_instr_size; // Total size of generated code in bytes. |
61 int64_t pc_desc_size; | 63 int64_t pc_desc_size; |
62 int64_t vardesc_size; | 64 int64_t vardesc_size; |
63 | 65 |
64 void Print(); | 66 void Print(); |
65 }; | 67 }; |
66 | 68 |
67 #define INC_STAT(isolate, counter, incr) \ | 69 #define INC_STAT(isolate, counter, incr) \ |
68 if (FLAG_compiler_stats) { (isolate)->compiler_stats()->counter += (incr); } | 70 if (FLAG_compiler_stats) { (isolate)->compiler_stats()->counter += (incr); } |
69 | 71 |
70 #define CSTAT_TIMER_SCOPE(thr, t) \ | 72 #define CSTAT_TIMER_SCOPE(thr, t) \ |
71 TimerScope timer(FLAG_compiler_stats, \ | 73 TimerScope timer(FLAG_compiler_stats, \ |
72 FLAG_compiler_stats ? &((thr)->isolate()->compiler_stats()->t) : NULL, \ | 74 FLAG_compiler_stats ? &((thr)->isolate()->compiler_stats()->t) : NULL, \ |
73 thr); | 75 thr); |
74 | 76 |
75 } // namespace dart | 77 } // namespace dart |
76 | 78 |
77 #endif // VM_COMPILER_STATS_H_ | 79 #endif // VM_COMPILER_STATS_H_ |
OLD | NEW |