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 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 inline void IncrementPromotedObjectsSize(int object_size) { | 1270 inline void IncrementPromotedObjectsSize(int object_size) { |
1271 DCHECK(object_size > 0); | 1271 DCHECK(object_size > 0); |
1272 promoted_objects_size_ += object_size; | 1272 promoted_objects_size_ += object_size; |
1273 } | 1273 } |
1274 | 1274 |
1275 inline void IncrementSemiSpaceCopiedObjectSize(int object_size) { | 1275 inline void IncrementSemiSpaceCopiedObjectSize(int object_size) { |
1276 DCHECK(object_size > 0); | 1276 DCHECK(object_size > 0); |
1277 semi_space_copied_object_size_ += object_size; | 1277 semi_space_copied_object_size_ += object_size; |
1278 } | 1278 } |
1279 | 1279 |
| 1280 inline intptr_t SurvivedNewSpaceObjectSize() { |
| 1281 return promoted_objects_size_ + semi_space_copied_object_size_; |
| 1282 } |
| 1283 |
1280 inline void IncrementNodesDiedInNewSpace() { nodes_died_in_new_space_++; } | 1284 inline void IncrementNodesDiedInNewSpace() { nodes_died_in_new_space_++; } |
1281 | 1285 |
1282 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; } | 1286 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; } |
1283 | 1287 |
1284 inline void IncrementNodesPromoted() { nodes_promoted_++; } | 1288 inline void IncrementNodesPromoted() { nodes_promoted_++; } |
1285 | 1289 |
1286 inline void IncrementYoungSurvivorsCounter(int survived) { | 1290 inline void IncrementYoungSurvivorsCounter(int survived) { |
1287 DCHECK(survived >= 0); | 1291 DCHECK(survived >= 0); |
1288 survived_last_scavenge_ = survived; | 1292 survived_last_scavenge_ = survived; |
1289 survived_since_last_expansion_ += survived; | 1293 survived_since_last_expansion_ += survived; |
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2836 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2833 | 2837 |
2834 private: | 2838 private: |
2835 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2839 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2836 }; | 2840 }; |
2837 #endif // DEBUG | 2841 #endif // DEBUG |
2838 } | 2842 } |
2839 } // namespace v8::internal | 2843 } // namespace v8::internal |
2840 | 2844 |
2841 #endif // V8_HEAP_HEAP_H_ | 2845 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |