Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: runtime/vm/coverage.cc

Issue 1700463002: Clone both descriptor and data array when compiling in background (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reviewer's comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698