| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECT_STATS_H_ | 5 #ifndef V8_HEAP_OBJECT_STATS_H_ |
| 6 #define V8_HEAP_OBJECT_STATS_H_ | 6 #define V8_HEAP_OBJECT_STATS_H_ |
| 7 | 7 |
| 8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
| 9 #include "src/heap/objects-visiting.h" |
| 9 #include "src/objects.h" | 10 #include "src/objects.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 | 14 |
| 14 class ObjectStats { | 15 class ObjectStats { |
| 15 public: | 16 public: |
| 16 explicit ObjectStats(Heap* heap) : heap_(heap) {} | 17 explicit ObjectStats(Heap* heap) : heap_(heap) {} |
| 17 | 18 |
| 18 // ObjectStats are kept in two arrays, counts and sizes. Related stats are | 19 // ObjectStats are kept in two arrays, counts and sizes. Related stats are |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 FixedArraySubInstanceType dictionary_type); | 93 FixedArraySubInstanceType dictionary_type); |
| 93 | 94 |
| 94 template <VisitorId id> | 95 template <VisitorId id> |
| 95 static inline void Visit(Map* map, HeapObject* obj); | 96 static inline void Visit(Map* map, HeapObject* obj); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace internal | 99 } // namespace internal |
| 99 } // namespace v8 | 100 } // namespace v8 |
| 100 | 101 |
| 101 #endif // V8_HEAP_OBJECT_STATS_H_ | 102 #endif // V8_HEAP_OBJECT_STATS_H_ |
| OLD | NEW |