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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 break; | 1020 break; |
1021 } | 1021 } |
1022 } | 1022 } |
1023 } | 1023 } |
1024 if (perform_gc) { | 1024 if (perform_gc) { |
1025 if (space == NEW_SPACE) { | 1025 if (space == NEW_SPACE) { |
1026 CollectGarbage(NEW_SPACE, "failed to reserve space in the new space"); | 1026 CollectGarbage(NEW_SPACE, "failed to reserve space in the new space"); |
1027 } else { | 1027 } else { |
1028 if (counter > 1) { | 1028 if (counter > 1) { |
1029 CollectAllGarbage( | 1029 CollectAllGarbage( |
1030 kReduceMemoryFootprintMask, | 1030 kReduceMemoryFootprintMask | kAbortIncrementalMarkingMask, |
1031 "failed to reserve space in paged or large " | 1031 "failed to reserve space in paged or large " |
1032 "object space, trying to reduce memory footprint"); | 1032 "object space, trying to reduce memory footprint"); |
1033 } else { | 1033 } else { |
1034 CollectAllGarbage( | 1034 CollectAllGarbage( |
1035 kAbortIncrementalMarkingMask, | 1035 kAbortIncrementalMarkingMask, |
1036 "failed to reserve space in paged or large object space"); | 1036 "failed to reserve space in paged or large object space"); |
1037 } | 1037 } |
1038 } | 1038 } |
1039 gc_performed = true; | 1039 gc_performed = true; |
1040 break; // Abort for-loop over spaces and retry. | 1040 break; // Abort for-loop over spaces and retry. |
(...skipping 5393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6434 static_cast<int>(object_sizes_last_time_[index])); | 6434 static_cast<int>(object_sizes_last_time_[index])); |
6435 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6435 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6436 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6436 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6437 | 6437 |
6438 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6438 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6439 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6439 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6440 ClearObjectStats(); | 6440 ClearObjectStats(); |
6441 } | 6441 } |
6442 } | 6442 } |
6443 } // namespace v8::internal | 6443 } // namespace v8::internal |
OLD | NEW |