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

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

Issue 1414933006: Copy ICData descriptors when starting background compilation, so that they do not change while comp… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 1 month 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_test.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/vm/compiler_test.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698