| 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 11 matching lines...) Expand all Loading... |
| 22 DEFINE_FLAG(int, old_gen_growth_space_ratio, 20, | 22 DEFINE_FLAG(int, old_gen_growth_space_ratio, 20, |
| 23 "The desired maximum percentage of free space after old gen GC"); | 23 "The desired maximum percentage of free space after old gen GC"); |
| 24 DEFINE_FLAG(int, old_gen_growth_time_ratio, 3, | 24 DEFINE_FLAG(int, old_gen_growth_time_ratio, 3, |
| 25 "The desired maximum percentage of time spent in old gen GC"); | 25 "The desired maximum percentage of time spent in old gen GC"); |
| 26 DEFINE_FLAG(int, old_gen_growth_rate, 280, | 26 DEFINE_FLAG(int, old_gen_growth_rate, 280, |
| 27 "The max number of pages the old generation can grow at a time"); | 27 "The max number of pages the old generation can grow at a time"); |
| 28 DEFINE_FLAG(bool, print_free_list_before_gc, false, | 28 DEFINE_FLAG(bool, print_free_list_before_gc, false, |
| 29 "Print free list statistics before a GC"); | 29 "Print free list statistics before a GC"); |
| 30 DEFINE_FLAG(bool, print_free_list_after_gc, false, | 30 DEFINE_FLAG(bool, print_free_list_after_gc, false, |
| 31 "Print free list statistics after a GC"); | 31 "Print free list statistics after a GC"); |
| 32 DEFINE_FLAG(bool, collect_code, true, | |
| 33 "Attempt to GC infrequently used code."); | |
| 34 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000, | 32 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000, |
| 35 "Time between attempts to collect unused code."); | 33 "Time between attempts to collect unused code."); |
| 36 DEFINE_FLAG(bool, log_code_drop, false, | 34 DEFINE_FLAG(bool, log_code_drop, false, |
| 37 "Emit a log message when pointers to unused code are dropped."); | 35 "Emit a log message when pointers to unused code are dropped."); |
| 38 DEFINE_FLAG(bool, always_drop_code, false, | 36 DEFINE_FLAG(bool, always_drop_code, false, |
| 39 "Always try to drop code if the function's usage counter is >= 0"); | 37 "Always try to drop code if the function's usage counter is >= 0"); |
| 40 #if defined(TARGET_ARCH_MIPS) || defined(TARGET_ARCH_ARM64) | 38 #if defined(TARGET_ARCH_MIPS) || defined(TARGET_ARCH_ARM64) |
| 41 DEFINE_FLAG(bool, concurrent_sweep, false, | 39 DEFINE_FLAG(bool, concurrent_sweep, false, |
| 42 "Concurrent sweep for old generation."); | 40 "Concurrent sweep for old generation."); |
| 43 #else // TARGET_ARCH_MIPS || TARGET_ARCH_ARM64 | 41 #else // TARGET_ARCH_MIPS || TARGET_ARCH_ARM64 |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 return 0; | 1235 return 0; |
| 1238 } else { | 1236 } else { |
| 1239 ASSERT(total_time >= gc_time); | 1237 ASSERT(total_time >= gc_time); |
| 1240 int result = static_cast<int>((static_cast<double>(gc_time) / | 1238 int result = static_cast<int>((static_cast<double>(gc_time) / |
| 1241 static_cast<double>(total_time)) * 100); | 1239 static_cast<double>(total_time)) * 100); |
| 1242 return result; | 1240 return result; |
| 1243 } | 1241 } |
| 1244 } | 1242 } |
| 1245 | 1243 |
| 1246 } // namespace dart | 1244 } // namespace dart |
| OLD | NEW |