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_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 // Objects are being grouped into buckets that roughly resemble existing | 1161 // Objects are being grouped into buckets that roughly resemble existing |
1162 // instance types. | 1162 // instance types. |
1163 size_t ObjectCountAtLastGC(size_t index); | 1163 size_t ObjectCountAtLastGC(size_t index); |
1164 size_t ObjectSizeAtLastGC(size_t index); | 1164 size_t ObjectSizeAtLastGC(size_t index); |
1165 | 1165 |
1166 // Retrieves names of buckets used by object statistics tracking. | 1166 // Retrieves names of buckets used by object statistics tracking. |
1167 bool GetObjectTypeName(size_t index, const char** object_type, | 1167 bool GetObjectTypeName(size_t index, const char** object_type, |
1168 const char** object_sub_type); | 1168 const char** object_sub_type); |
1169 | 1169 |
1170 // =========================================================================== | 1170 // =========================================================================== |
| 1171 // Code statistics. ========================================================== |
| 1172 // =========================================================================== |
| 1173 |
| 1174 // Collect code (Code and BytecodeArray objects) statistics. |
| 1175 void CollectCodeStatistics(); |
| 1176 |
| 1177 // =========================================================================== |
1171 // GC statistics. ============================================================ | 1178 // GC statistics. ============================================================ |
1172 // =========================================================================== | 1179 // =========================================================================== |
1173 | 1180 |
1174 // Returns the maximum amount of memory reserved for the heap. | 1181 // Returns the maximum amount of memory reserved for the heap. |
1175 intptr_t MaxReserved() { | 1182 intptr_t MaxReserved() { |
1176 return 2 * max_semi_space_size_ + max_old_generation_size_; | 1183 return 2 * max_semi_space_size_ + max_old_generation_size_; |
1177 } | 1184 } |
1178 int MaxSemiSpaceSize() { return max_semi_space_size_; } | 1185 int MaxSemiSpaceSize() { return max_semi_space_size_; } |
1179 int InitialSemiSpaceSize() { return initial_semispace_size_; } | 1186 int InitialSemiSpaceSize() { return initial_semispace_size_; } |
1180 intptr_t MaxOldGenerationSize() { return max_old_generation_size_; } | 1187 intptr_t MaxOldGenerationSize() { return max_old_generation_size_; } |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 friend class LargeObjectSpace; | 2654 friend class LargeObjectSpace; |
2648 friend class NewSpace; | 2655 friend class NewSpace; |
2649 friend class PagedSpace; | 2656 friend class PagedSpace; |
2650 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2657 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2651 }; | 2658 }; |
2652 | 2659 |
2653 } // namespace internal | 2660 } // namespace internal |
2654 } // namespace v8 | 2661 } // namespace v8 |
2655 | 2662 |
2656 #endif // V8_HEAP_HEAP_H_ | 2663 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |