OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/coverage.h" | 5 #include "vm/coverage.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) { | 76 if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) { |
77 // Ignore the error and this function entirely. | 77 // Ignore the error and this function entirely. |
78 return; | 78 return; |
79 } | 79 } |
80 const Code& code = Code::Handle(zone, function.unoptimized_code()); | 80 const Code& code = Code::Handle(zone, function.unoptimized_code()); |
81 ASSERT(!code.IsNull()); | 81 ASSERT(!code.IsNull()); |
82 | 82 |
83 // Print the hit counts for all IC datas. | 83 // Print the hit counts for all IC datas. |
84 ZoneGrowableArray<const ICData*>* ic_data_array = | 84 ZoneGrowableArray<const ICData*>* ic_data_array = |
85 new(zone) ZoneGrowableArray<const ICData*>(); | 85 new(zone) ZoneGrowableArray<const ICData*>(); |
86 function.RestoreICDataMap(ic_data_array); | 86 function.RestoreICDataMap(ic_data_array, false /* clone descriptors */); |
87 const PcDescriptors& descriptors = PcDescriptors::Handle( | 87 const PcDescriptors& descriptors = PcDescriptors::Handle( |
88 zone, code.pc_descriptors()); | 88 zone, code.pc_descriptors()); |
89 | 89 |
90 const intptr_t begin_pos = function.token_pos(); | 90 const intptr_t begin_pos = function.token_pos(); |
91 const intptr_t end_pos = function.end_token_pos(); | 91 const intptr_t end_pos = function.end_token_pos(); |
92 intptr_t last_line = -1; | 92 intptr_t last_line = -1; |
93 intptr_t last_count = 0; | 93 intptr_t last_count = 0; |
94 // Only IC based calls have counting. | 94 // Only IC based calls have counting. |
95 PcDescriptors::Iterator iter(descriptors, | 95 PcDescriptors::Iterator iter(descriptors, |
96 RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall); | 96 RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 cls = it.GetNextClass(); | 284 cls = it.GetNextClass(); |
285 ASSERT(!cls.IsNull()); | 285 ASSERT(!cls.IsNull()); |
286 PrintClass(lib, cls, jsarr, filter, as_call_sites); | 286 PrintClass(lib, cls, jsarr, filter, as_call_sites); |
287 } | 287 } |
288 } | 288 } |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 } // namespace dart | 293 } // namespace dart |
OLD | NEW |