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 #ifndef V8_HEAP_H_ | 5 #ifndef V8_HEAP_H_ |
6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 int64_t amount_of_external_allocated_memory() { | 1356 int64_t amount_of_external_allocated_memory() { |
1357 return amount_of_external_allocated_memory_; | 1357 return amount_of_external_allocated_memory_; |
1358 } | 1358 } |
1359 | 1359 |
1360 void DeoptMarkedAllocationSites(); | 1360 void DeoptMarkedAllocationSites(); |
1361 | 1361 |
1362 bool MaximumSizeScavenge() { | 1362 bool MaximumSizeScavenge() { |
1363 return maximum_size_scavenges_ > 0; | 1363 return maximum_size_scavenges_ > 0; |
1364 } | 1364 } |
1365 | 1365 |
| 1366 bool DeoptMaybeTenuredAllocationSites() { |
| 1367 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; |
| 1368 } |
| 1369 |
1366 // ObjectStats are kept in two arrays, counts and sizes. Related stats are | 1370 // ObjectStats are kept in two arrays, counts and sizes. Related stats are |
1367 // stored in a contiguous linear buffer. Stats groups are stored one after | 1371 // stored in a contiguous linear buffer. Stats groups are stored one after |
1368 // another. | 1372 // another. |
1369 enum { | 1373 enum { |
1370 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, | 1374 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, |
1371 FIRST_FIXED_ARRAY_SUB_TYPE = | 1375 FIRST_FIXED_ARRAY_SUB_TYPE = |
1372 FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS, | 1376 FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS, |
1373 FIRST_CODE_AGE_SUB_TYPE = | 1377 FIRST_CODE_AGE_SUB_TYPE = |
1374 FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1, | 1378 FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1, |
1375 OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1 | 1379 OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1 |
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2771 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2775 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2772 | 2776 |
2773 private: | 2777 private: |
2774 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2778 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2775 }; | 2779 }; |
2776 #endif // DEBUG | 2780 #endif // DEBUG |
2777 | 2781 |
2778 } } // namespace v8::internal | 2782 } } // namespace v8::internal |
2779 | 2783 |
2780 #endif // V8_HEAP_H_ | 2784 #endif // V8_HEAP_H_ |
OLD | NEW |