| 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 4947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4958 } | 4958 } |
| 4959 if (FLAG_max_executable_size > 0) { | 4959 if (FLAG_max_executable_size > 0) { |
| 4960 max_executable_size_ = FLAG_max_executable_size * MB; | 4960 max_executable_size_ = FLAG_max_executable_size * MB; |
| 4961 } | 4961 } |
| 4962 | 4962 |
| 4963 if (FLAG_stress_compaction) { | 4963 if (FLAG_stress_compaction) { |
| 4964 // This will cause more frequent GCs when stressing. | 4964 // This will cause more frequent GCs when stressing. |
| 4965 max_semi_space_size_ = Page::kPageSize; | 4965 max_semi_space_size_ = Page::kPageSize; |
| 4966 } | 4966 } |
| 4967 | 4967 |
| 4968 if (Snapshot::HaveASnapshotToStartFrom()) { | 4968 if (Snapshot::IsEnabled()) { |
| 4969 // If we are using a snapshot we always reserve the default amount | 4969 // If we are using a snapshot we always reserve the default amount |
| 4970 // of memory for each semispace because code in the snapshot has | 4970 // of memory for each semispace because code in the snapshot has |
| 4971 // write-barrier code that relies on the size and alignment of new | 4971 // write-barrier code that relies on the size and alignment of new |
| 4972 // space. We therefore cannot use a larger max semispace size | 4972 // space. We therefore cannot use a larger max semispace size |
| 4973 // than the default reserved semispace size. | 4973 // than the default reserved semispace size. |
| 4974 if (max_semi_space_size_ > reserved_semispace_size_) { | 4974 if (max_semi_space_size_ > reserved_semispace_size_) { |
| 4975 max_semi_space_size_ = reserved_semispace_size_; | 4975 max_semi_space_size_ = reserved_semispace_size_; |
| 4976 if (FLAG_trace_gc) { | 4976 if (FLAG_trace_gc) { |
| 4977 PrintPID("Max semi-space size cannot be more than %d kbytes\n", | 4977 PrintPID("Max semi-space size cannot be more than %d kbytes\n", |
| 4978 reserved_semispace_size_ >> 10); | 4978 reserved_semispace_size_ >> 10); |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6436 static_cast<int>(object_sizes_last_time_[index])); | 6436 static_cast<int>(object_sizes_last_time_[index])); |
| 6437 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6437 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6438 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6438 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6439 | 6439 |
| 6440 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6440 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6441 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6441 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6442 ClearObjectStats(); | 6442 ClearObjectStats(); |
| 6443 } | 6443 } |
| 6444 | 6444 |
| 6445 } } // namespace v8::internal | 6445 } } // namespace v8::internal |
| OLD | NEW |