| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) { | 82 if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) { |
| 83 // Ignore the error and this function entirely. | 83 // Ignore the error and this function entirely. |
| 84 return; | 84 return; |
| 85 } | 85 } |
| 86 const Code& code = Code::Handle(zone, function.unoptimized_code()); | 86 const Code& code = Code::Handle(zone, function.unoptimized_code()); |
| 87 ASSERT(!code.IsNull()); | 87 ASSERT(!code.IsNull()); |
| 88 | 88 |
| 89 // Print the hit counts for all IC datas. | 89 // Print the hit counts for all IC datas. |
| 90 ZoneGrowableArray<const ICData*>* ic_data_array = | 90 ZoneGrowableArray<const ICData*>* ic_data_array = |
| 91 new(zone) ZoneGrowableArray<const ICData*>(); | 91 new(zone) ZoneGrowableArray<const ICData*>(); |
| 92 function.RestoreICDataMap(ic_data_array, false /* clone descriptors */); | 92 function.RestoreICDataMap(ic_data_array, false /* clone ic-data */); |
| 93 const PcDescriptors& descriptors = PcDescriptors::Handle( | 93 const PcDescriptors& descriptors = PcDescriptors::Handle( |
| 94 zone, code.pc_descriptors()); | 94 zone, code.pc_descriptors()); |
| 95 | 95 |
| 96 const TokenPosition begin_pos = function.token_pos(); | 96 const TokenPosition begin_pos = function.token_pos(); |
| 97 const TokenPosition end_pos = function.end_token_pos(); | 97 const TokenPosition end_pos = function.end_token_pos(); |
| 98 intptr_t last_line = -1; | 98 intptr_t last_line = -1; |
| 99 intptr_t last_count = 0; | 99 intptr_t last_count = 0; |
| 100 // Only IC based calls have counting. | 100 // Only IC based calls have counting. |
| 101 PcDescriptors::Iterator iter(descriptors, | 101 PcDescriptors::Iterator iter(descriptors, |
| 102 RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall); | 102 RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 cls = it.GetNextClass(); | 304 cls = it.GetNextClass(); |
| 305 ASSERT(!cls.IsNull()); | 305 ASSERT(!cls.IsNull()); |
| 306 PrintClass(lib, cls, jsarr, filter, as_call_sites); | 306 PrintClass(lib, cls, jsarr, filter, as_call_sites); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 | 312 |
| 313 } // namespace dart | 313 } // namespace dart |
| OLD | NEW |