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

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

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/pages.h" 5 #include "vm/pages.h"
6 6
7 #include "platform/address_sanitizer.h" 7 #include "platform/address_sanitizer.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/compiler_stats.h" 9 #include "vm/compiler_stats.h"
10 #include "vm/gc_marker.h" 10 #include "vm/gc_marker.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (!is_exec) { 239 if (!is_exec) {
240 if (pages_ == NULL) { 240 if (pages_ == NULL) {
241 pages_ = page; 241 pages_ = page;
242 } else { 242 } else {
243 pages_tail_->set_next(page); 243 pages_tail_->set_next(page);
244 } 244 }
245 pages_tail_ = page; 245 pages_tail_ = page;
246 } else { 246 } else {
247 // Should not allocate executable pages when running from a precompiled 247 // Should not allocate executable pages when running from a precompiled
248 // snapshot. 248 // snapshot.
249 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT); 249 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kFullAOT);
250 250
251 if (exec_pages_ == NULL) { 251 if (exec_pages_ == NULL) {
252 exec_pages_ = page; 252 exec_pages_ = page;
253 } else { 253 } else {
254 if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) { 254 if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) {
255 exec_pages_tail_->WriteProtect(false); 255 exec_pages_tail_->WriteProtect(false);
256 } 256 }
257 exec_pages_tail_->set_next(page); 257 exec_pages_tail_->set_next(page);
258 if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) { 258 if (FLAG_write_protect_code && !exec_pages_tail_->is_image_page()) {
259 exec_pages_tail_->WriteProtect(true); 259 exec_pages_tail_->WriteProtect(true);
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 return 0; 1307 return 0;
1308 } else { 1308 } else {
1309 ASSERT(total_time >= gc_time); 1309 ASSERT(total_time >= gc_time);
1310 int result = static_cast<int>( 1310 int result = static_cast<int>(
1311 (static_cast<double>(gc_time) / static_cast<double>(total_time)) * 100); 1311 (static_cast<double>(gc_time) / static_cast<double>(total_time)) * 100);
1312 return result; 1312 return result;
1313 } 1313 }
1314 } 1314 }
1315 1315
1316 } // namespace dart 1316 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698