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/timer.h" | 8 #include "vm/timer.h" |
9 | 9 |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 num_tokens_consumed, | 57 num_tokens_consumed, |
58 (1.0 * num_tokens_consumed) / num_tokens_total); | 58 (1.0 * num_tokens_consumed) / num_tokens_total); |
59 OS::Print("Tokens checked: %"Pd" (%.2f times tokens consumed)\n", | 59 OS::Print("Tokens checked: %"Pd" (%.2f times tokens consumed)\n", |
60 num_token_checks, (1.0 * num_token_checks) / num_tokens_consumed); | 60 num_token_checks, (1.0 * num_token_checks) / num_tokens_consumed); |
61 OS::Print("Token rewind: %"Pd" (%"Pd"%% of tokens checked)\n", | 61 OS::Print("Token rewind: %"Pd" (%"Pd"%% of tokens checked)\n", |
62 num_tokens_rewind, (100 * num_tokens_rewind) / num_token_checks); | 62 num_tokens_rewind, (100 * num_tokens_rewind) / num_token_checks); |
63 OS::Print("Token lookahead: %"Pd" (%"Pd"%% of tokens checked)\n", | 63 OS::Print("Token lookahead: %"Pd" (%"Pd"%% of tokens checked)\n", |
64 num_tokens_lookahead, | 64 num_tokens_lookahead, |
65 (100 * num_tokens_lookahead) / num_token_checks); | 65 (100 * num_tokens_lookahead) / num_token_checks); |
66 OS::Print("Source length: %"Pd" characters\n", src_length); | 66 OS::Print("Source length: %"Pd" characters\n", src_length); |
67 intptr_t scan_usecs = scanner_timer.TotalElapsedTime(); | 67 int64_t scan_usecs = scanner_timer.TotalElapsedTime(); |
68 OS::Print("Scanner time: %"Pd" msecs\n", | 68 OS::Print("Scanner time: %"Pd64" msecs\n", |
69 scan_usecs / 1000); | 69 scan_usecs / 1000); |
70 intptr_t parse_usecs = parser_timer.TotalElapsedTime(); | 70 int64_t parse_usecs = parser_timer.TotalElapsedTime(); |
71 OS::Print("Parser time: %"Pd" msecs\n", | 71 OS::Print("Parser time: %"Pd64" msecs\n", |
72 parse_usecs / 1000); | 72 parse_usecs / 1000); |
73 intptr_t codegen_usecs = codegen_timer.TotalElapsedTime(); | 73 int64_t codegen_usecs = codegen_timer.TotalElapsedTime(); |
74 OS::Print("Code gen. time: %"Pd" msecs\n", | 74 OS::Print("Code gen. time: %"Pd64" msecs\n", |
75 codegen_usecs / 1000); | 75 codegen_usecs / 1000); |
76 intptr_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime(); | 76 int64_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime(); |
77 OS::Print(" Graph builder time: %"Pd" msecs\n", graphbuilder_usecs / 1000); | 77 OS::Print(" Graph builder time: %"Pd64" msecs\n", graphbuilder_usecs / 1000); |
78 intptr_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime(); | 78 int64_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime(); |
79 OS::Print(" Graph comp. time: %"Pd" msecs\n", graphcompiler_usecs / 1000); | 79 OS::Print(" Graph comp. time: %"Pd64" msecs\n", |
80 intptr_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime(); | 80 graphcompiler_usecs / 1000); |
81 OS::Print(" Code final. time: %"Pd" msecs\n", codefinalizer_usecs / 1000); | 81 int64_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime(); |
82 OS::Print("Compilation speed: %"Pd" tokens per msec\n", | 82 OS::Print(" Code final. time: %"Pd64" msecs\n", |
| 83 codefinalizer_usecs / 1000); |
| 84 OS::Print("Compilation speed: %"Pd64" tokens per msec\n", |
83 1000 * num_tokens_total / (parse_usecs + codegen_usecs)); | 85 1000 * num_tokens_total / (parse_usecs + codegen_usecs)); |
84 OS::Print("Code size: %"Pd" KB\n", | 86 OS::Print("Code size: %"Pd" KB\n", |
85 code_allocated / 1024); | 87 code_allocated / 1024); |
86 OS::Print("Code density: %"Pd" tokens per KB\n", | 88 OS::Print("Code density: %"Pd" tokens per KB\n", |
87 num_tokens_total * 1024 / code_allocated); | 89 num_tokens_total * 1024 / code_allocated); |
88 } | 90 } |
89 | 91 |
90 } // namespace dart | 92 } // namespace dart |
OLD | NEW |