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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
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_rewind; | |
53 int64_t num_tokens_lookahead; | 52 int64_t num_tokens_lookahead; |
54 | 53 |
55 int64_t num_classes_compiled; | 54 int64_t num_classes_compiled; |
56 int64_t num_functions_compiled; | 55 int64_t num_functions_compiled; |
57 int64_t num_implicit_final_getters; | 56 int64_t num_implicit_final_getters; |
58 | 57 |
59 int64_t src_length; // Total number of characters in source. | 58 int64_t src_length; // Total number of characters in source. |
60 int64_t total_code_size; // Bytes allocated for code and meta info. | 59 int64_t total_code_size; // Bytes allocated for code and meta info. |
61 int64_t total_instr_size; // Total size of generated code in bytes. | 60 int64_t total_instr_size; // Total size of generated code in bytes. |
62 int64_t pc_desc_size; | 61 int64_t pc_desc_size; |
63 int64_t vardesc_size; | 62 int64_t vardesc_size; |
64 | 63 |
65 void Print(); | 64 void Print(); |
66 }; | 65 }; |
67 | 66 |
68 #define INC_STAT(isolate, counter, incr) \ | 67 #define INC_STAT(isolate, counter, incr) \ |
69 if (FLAG_compiler_stats) { (isolate)->compiler_stats()->counter += (incr); } | 68 if (FLAG_compiler_stats) { (isolate)->compiler_stats()->counter += (incr); } |
70 | 69 |
71 #define CSTAT_TIMER_SCOPE(iso, t) \ | 70 #define CSTAT_TIMER_SCOPE(iso, t) \ |
72 TimerScope timer(FLAG_compiler_stats, \ | 71 TimerScope timer(FLAG_compiler_stats, \ |
73 FLAG_compiler_stats ? &((iso)->compiler_stats()->t) : NULL, \ | 72 FLAG_compiler_stats ? &((iso)->compiler_stats()->t) : NULL, \ |
74 iso); | 73 iso); |
75 | 74 |
76 } // namespace dart | 75 } // namespace dart |
77 | 76 |
78 #endif // VM_COMPILER_STATS_H_ | 77 #endif // VM_COMPILER_STATS_H_ |
OLD | NEW |