| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 "Print free list statistics after a GC"); | 27 "Print free list statistics after a GC"); |
| 28 DEFINE_FLAG(bool, collect_code, true, | 28 DEFINE_FLAG(bool, collect_code, true, |
| 29 "Attempt to GC infrequently used code."); | 29 "Attempt to GC infrequently used code."); |
| 30 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000, | 30 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000, |
| 31 "Time between attempts to collect unused code."); | 31 "Time between attempts to collect unused code."); |
| 32 DEFINE_FLAG(bool, log_code_drop, false, | 32 DEFINE_FLAG(bool, log_code_drop, false, |
| 33 "Emit a log message when pointers to unused code are dropped."); | 33 "Emit a log message when pointers to unused code are dropped."); |
| 34 DEFINE_FLAG(bool, always_drop_code, false, | 34 DEFINE_FLAG(bool, always_drop_code, false, |
| 35 "Always try to drop code if the function's usage counter is >= 0"); | 35 "Always try to drop code if the function's usage counter is >= 0"); |
| 36 #if defined(TARGET_ARCH_IA32) | 36 #if defined(TARGET_ARCH_IA32) |
| 37 DEFINE_FLAG(bool, concurrent_sweep, false, | 37 DEFINE_FLAG(bool, concurrent_sweep, true, |
| 38 "Concurrent sweep for old generation."); | 38 "Concurrent sweep for old generation."); |
| 39 #else // TARGET_ARCH_IA32 | 39 #else // TARGET_ARCH_IA32 |
| 40 DEFINE_FLAG(bool, concurrent_sweep, false, | 40 DEFINE_FLAG(bool, concurrent_sweep, false, |
| 41 "Concurrent sweep for old generation."); | 41 "Concurrent sweep for old generation."); |
| 42 #endif // TARGET_ARCH_IA32 | 42 #endif // TARGET_ARCH_IA32 |
| 43 DEFINE_FLAG(bool, log_growth, false, "Log PageSpace growth policy decisions."); | 43 DEFINE_FLAG(bool, log_growth, false, "Log PageSpace growth policy decisions."); |
| 44 | 44 |
| 45 HeapPage* HeapPage::Initialize(VirtualMemory* memory, PageType type) { | 45 HeapPage* HeapPage::Initialize(VirtualMemory* memory, PageType type) { |
| 46 ASSERT(memory->size() > VirtualMemory::PageSize()); | 46 ASSERT(memory->size() > VirtualMemory::PageSize()); |
| 47 bool is_executable = (type == kExecutable); | 47 bool is_executable = (type == kExecutable); |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 return 0; | 996 return 0; |
| 997 } else { | 997 } else { |
| 998 ASSERT(total_time >= gc_time); | 998 ASSERT(total_time >= gc_time); |
| 999 int result= static_cast<int>((static_cast<double>(gc_time) / | 999 int result= static_cast<int>((static_cast<double>(gc_time) / |
| 1000 static_cast<double>(total_time)) * 100); | 1000 static_cast<double>(total_time)) * 100); |
| 1001 return result; | 1001 return result; |
| 1002 } | 1002 } |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 } // namespace dart | 1005 } // namespace dart |
| OLD | NEW |