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

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

Issue 1544583002: For background compilation we copy ICData so that it is immutable during comnpilation. However, we … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: remove flag Created 5 years 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/object_test.cc ('k') | runtime/vm/raw_object.h » ('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) 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/assert.h" 7 #include "platform/assert.h"
8 #include "vm/compiler_stats.h" 8 #include "vm/compiler_stats.h"
9 #include "vm/gc_marker.h" 9 #include "vm/gc_marker.h"
10 #include "vm/gc_sweeper.h" 10 #include "vm/gc_sweeper.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } else { 354 } else {
355 freelist_[type].Free(free_start, free_size); 355 freelist_[type].Free(free_start, free_size);
356 } 356 }
357 } 357 }
358 } 358 }
359 return result; 359 return result;
360 } 360 }
361 361
362 362
363 uword PageSpace::TryAllocateInternal(intptr_t size, 363 uword PageSpace::TryAllocateInternal(intptr_t size,
364 HeapPage::PageType type, 364 HeapPage::PageType type,
365 GrowthPolicy growth_policy, 365 GrowthPolicy growth_policy,
366 bool is_protected, 366 bool is_protected,
367 bool is_locked) { 367 bool is_locked) {
368 ASSERT(size >= kObjectAlignment); 368 ASSERT(size >= kObjectAlignment);
369 ASSERT(Utils::IsAligned(size, kObjectAlignment)); 369 ASSERT(Utils::IsAligned(size, kObjectAlignment));
370 #ifdef DEBUG 370 #ifdef DEBUG
371 SpaceUsage usage_before = GetCurrentUsage(); 371 SpaceUsage usage_before = GetCurrentUsage();
372 #endif 372 #endif
373 uword result = 0; 373 uword result = 0;
374 if (size < kAllocatablePageSize) { 374 if (size < kAllocatablePageSize) {
375 if (is_locked) { 375 if (is_locked) {
376 result = freelist_[type].TryAllocateLocked(size, is_protected); 376 result = freelist_[type].TryAllocateLocked(size, is_protected);
377 } else { 377 } else {
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 return 0; 1215 return 0;
1216 } else { 1216 } else {
1217 ASSERT(total_time >= gc_time); 1217 ASSERT(total_time >= gc_time);
1218 int result = static_cast<int>((static_cast<double>(gc_time) / 1218 int result = static_cast<int>((static_cast<double>(gc_time) /
1219 static_cast<double>(total_time)) * 100); 1219 static_cast<double>(total_time)) * 100);
1220 return result; 1220 return result;
1221 } 1221 }
1222 } 1222 }
1223 1223
1224 } // namespace dart 1224 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698