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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 4935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4946 } | 4946 } |
4947 if (FLAG_max_executable_size > 0) { | 4947 if (FLAG_max_executable_size > 0) { |
4948 max_executable_size_ = FLAG_max_executable_size * MB; | 4948 max_executable_size_ = FLAG_max_executable_size * MB; |
4949 } | 4949 } |
4950 | 4950 |
4951 if (FLAG_stress_compaction) { | 4951 if (FLAG_stress_compaction) { |
4952 // This will cause more frequent GCs when stressing. | 4952 // This will cause more frequent GCs when stressing. |
4953 max_semi_space_size_ = Page::kPageSize; | 4953 max_semi_space_size_ = Page::kPageSize; |
4954 } | 4954 } |
4955 | 4955 |
4956 if (Snapshot::IsEnabled()) { | 4956 if (Snapshot::HaveASnapshotToStartFrom()) { |
4957 // If we are using a snapshot we always reserve the default amount | 4957 // If we are using a snapshot we always reserve the default amount |
4958 // of memory for each semispace because code in the snapshot has | 4958 // of memory for each semispace because code in the snapshot has |
4959 // write-barrier code that relies on the size and alignment of new | 4959 // write-barrier code that relies on the size and alignment of new |
4960 // space. We therefore cannot use a larger max semispace size | 4960 // space. We therefore cannot use a larger max semispace size |
4961 // than the default reserved semispace size. | 4961 // than the default reserved semispace size. |
4962 if (max_semi_space_size_ > reserved_semispace_size_) { | 4962 if (max_semi_space_size_ > reserved_semispace_size_) { |
4963 max_semi_space_size_ = reserved_semispace_size_; | 4963 max_semi_space_size_ = reserved_semispace_size_; |
4964 if (FLAG_trace_gc) { | 4964 if (FLAG_trace_gc) { |
4965 PrintPID("Max semi-space size cannot be more than %d kbytes\n", | 4965 PrintPID("Max semi-space size cannot be more than %d kbytes\n", |
4966 reserved_semispace_size_ >> 10); | 4966 reserved_semispace_size_ >> 10); |
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6424 static_cast<int>(object_sizes_last_time_[index])); | 6424 static_cast<int>(object_sizes_last_time_[index])); |
6425 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6425 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6426 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6426 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6427 | 6427 |
6428 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6428 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6429 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6429 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6430 ClearObjectStats(); | 6430 ClearObjectStats(); |
6431 } | 6431 } |
6432 | 6432 |
6433 } } // namespace v8::internal | 6433 } } // namespace v8::internal |
OLD | NEW |