OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 DedupStackmapLists(); | 222 DedupStackmapLists(); |
223 | 223 |
224 if (FLAG_dedup_instructions) { | 224 if (FLAG_dedup_instructions) { |
225 // Reduces binary size but obfuscates profiler results. | 225 // Reduces binary size but obfuscates profiler results. |
226 DedupInstructions(); | 226 DedupInstructions(); |
227 } | 227 } |
228 | 228 |
229 zone_ = NULL; | 229 zone_ = NULL; |
230 } | 230 } |
231 | 231 |
232 intptr_t dropped_symbols_count = Symbols::Compact(I); | 232 intptr_t symbols_before = -1; |
233 intptr_t symbols_after = -1; | |
234 intptr_t capacity = -1; | |
235 Symbols::GetStats(I, &symbols_before, &capacity); | |
siva
2016/05/10 00:49:10
Should these two calls to Symbols::GetStats be und
rmacnak
2016/05/10 01:45:01
Done.
| |
236 Symbols::Compact(I); | |
237 Symbols::GetStats(I, &symbols_after, &capacity); | |
238 | |
233 if (FLAG_trace_precompiler) { | 239 if (FLAG_trace_precompiler) { |
234 THR_Print("Precompiled %" Pd " functions,", function_count_); | 240 THR_Print("Precompiled %" Pd " functions,", function_count_); |
235 THR_Print(" %" Pd " dynamic types,", class_count_); | 241 THR_Print(" %" Pd " dynamic types,", class_count_); |
236 THR_Print(" %" Pd " dynamic selectors.\n", selector_count_); | 242 THR_Print(" %" Pd " dynamic selectors.\n", selector_count_); |
237 | 243 |
238 THR_Print("Dropped %" Pd " functions,", dropped_function_count_); | 244 THR_Print("Dropped %" Pd " functions,", dropped_function_count_); |
239 THR_Print(" %" Pd " fields,", dropped_field_count_); | 245 THR_Print(" %" Pd " fields,", dropped_field_count_); |
240 THR_Print(" %" Pd " symbols,", dropped_symbols_count); | 246 THR_Print(" %" Pd " symbols,", symbols_before - symbols_after); |
241 THR_Print(" %" Pd " types,", dropped_type_count_); | 247 THR_Print(" %" Pd " types,", dropped_type_count_); |
242 THR_Print(" %" Pd " type arguments,", dropped_typearg_count_); | 248 THR_Print(" %" Pd " type arguments,", dropped_typearg_count_); |
243 THR_Print(" %" Pd " classes,", dropped_class_count_); | 249 THR_Print(" %" Pd " classes,", dropped_class_count_); |
244 THR_Print(" %" Pd " libraries.\n", dropped_library_count_); | 250 THR_Print(" %" Pd " libraries.\n", dropped_library_count_); |
245 } | 251 } |
246 } | 252 } |
247 | 253 |
248 | 254 |
249 void Precompiler::ClearAllCode() { | 255 void Precompiler::ClearAllCode() { |
250 class ClearCodeFunctionVisitor : public FunctionVisitor { | 256 class ClearCodeFunctionVisitor : public FunctionVisitor { |
(...skipping 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2750 CompilationPipeline::New(thread->zone(), function); | 2756 CompilationPipeline::New(thread->zone(), function); |
2751 | 2757 |
2752 ASSERT(FLAG_precompiled_mode); | 2758 ASSERT(FLAG_precompiled_mode); |
2753 const bool optimized = function.IsOptimizable(); // False for natives. | 2759 const bool optimized = function.IsOptimizable(); // False for natives. |
2754 return PrecompileFunctionHelper(pipeline, function, optimized); | 2760 return PrecompileFunctionHelper(pipeline, function, optimized); |
2755 } | 2761 } |
2756 | 2762 |
2757 #endif // DART_PRECOMPILER | 2763 #endif // DART_PRECOMPILER |
2758 | 2764 |
2759 } // namespace dart | 2765 } // namespace dart |
OLD | NEW |