OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 5580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5591 if (FLAG_trace_gc_verbose) { | 5591 if (FLAG_trace_gc_verbose) { |
5592 PrintIsolate(isolate_, | 5592 PrintIsolate(isolate_, |
5593 "Heap growing factor %.1f based on mu=%.3f, speed_ratio=%.f " | 5593 "Heap growing factor %.1f based on mu=%.3f, speed_ratio=%.f " |
5594 "(gc=%.f, mutator=%.f)\n", | 5594 "(gc=%.f, mutator=%.f)\n", |
5595 factor, kTargetMutatorUtilization, gc_speed / mutator_speed, | 5595 factor, kTargetMutatorUtilization, gc_speed / mutator_speed, |
5596 gc_speed, mutator_speed); | 5596 gc_speed, mutator_speed); |
5597 } | 5597 } |
5598 | 5598 |
5599 // We set the old generation growing factor to 2 to grow the heap slower on | 5599 // We set the old generation growing factor to 2 to grow the heap slower on |
5600 // memory-constrained devices. | 5600 // memory-constrained devices. |
5601 if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice) { | 5601 if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice || |
| 5602 FLAG_optimize_for_size) { |
5602 factor = Min(factor, kMaxHeapGrowingFactorMemoryConstrained); | 5603 factor = Min(factor, kMaxHeapGrowingFactorMemoryConstrained); |
5603 } | 5604 } |
5604 | 5605 |
5605 if (FLAG_stress_compaction || | 5606 if (FLAG_stress_compaction || |
5606 mark_compact_collector()->reduce_memory_footprint_) { | 5607 mark_compact_collector()->reduce_memory_footprint_) { |
5607 factor = kMinHeapGrowingFactor; | 5608 factor = kMinHeapGrowingFactor; |
5608 } | 5609 } |
5609 | 5610 |
5610 // TODO(hpayer): Investigate if idle_old_generation_allocation_limit_ is still | 5611 // TODO(hpayer): Investigate if idle_old_generation_allocation_limit_ is still |
5611 // needed after taking the allocation rate for the old generation limit into | 5612 // needed after taking the allocation rate for the old generation limit into |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6861 *object_type = "CODE_TYPE"; \ | 6862 *object_type = "CODE_TYPE"; \ |
6862 *object_sub_type = "CODE_AGE/" #name; \ | 6863 *object_sub_type = "CODE_AGE/" #name; \ |
6863 return true; | 6864 return true; |
6864 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6865 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6865 #undef COMPARE_AND_RETURN_NAME | 6866 #undef COMPARE_AND_RETURN_NAME |
6866 } | 6867 } |
6867 return false; | 6868 return false; |
6868 } | 6869 } |
6869 } // namespace internal | 6870 } // namespace internal |
6870 } // namespace v8 | 6871 } // namespace v8 |
OLD | NEW |