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 <set> | 8 #include <set> |
9 | 9 |
10 #include "src/base/ieee754.h" | 10 #include "src/base/ieee754.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 class ObjectStatsCollector { | 121 class ObjectStatsCollector { |
122 public: | 122 public: |
123 ObjectStatsCollector(Heap* heap, ObjectStats* stats) | 123 ObjectStatsCollector(Heap* heap, ObjectStats* stats) |
124 : heap_(heap), stats_(stats) {} | 124 : heap_(heap), stats_(stats) {} |
125 | 125 |
126 void CollectGlobalStatistics(); | 126 void CollectGlobalStatistics(); |
127 void CollectStatistics(HeapObject* obj); | 127 void CollectStatistics(HeapObject* obj); |
128 | 128 |
129 private: | 129 private: |
| 130 void RecordBytecodeArrayDetails(BytecodeArray* obj); |
130 void RecordCodeDetails(Code* code); | 131 void RecordCodeDetails(Code* code); |
131 void RecordFixedArrayDetails(FixedArray* array); | 132 void RecordFixedArrayDetails(FixedArray* array); |
132 void RecordJSCollectionDetails(JSObject* obj); | 133 void RecordJSCollectionDetails(JSObject* obj); |
133 void RecordJSFunctionDetails(JSFunction* function); | 134 void RecordJSFunctionDetails(JSFunction* function); |
134 void RecordJSObjectDetails(JSObject* object); | 135 void RecordJSObjectDetails(JSObject* object); |
135 void RecordJSWeakCollectionDetails(JSWeakCollection* obj); | 136 void RecordJSWeakCollectionDetails(JSWeakCollection* obj); |
136 void RecordMapDetails(Map* map); | 137 void RecordMapDetails(Map* map); |
137 void RecordScriptDetails(Script* obj); | 138 void RecordScriptDetails(Script* obj); |
138 void RecordSharedFunctionInfoDetails(SharedFunctionInfo* sfi); | 139 void RecordSharedFunctionInfoDetails(SharedFunctionInfo* sfi); |
139 | 140 |
140 bool RecordFixedArrayHelper(HeapObject* parent, FixedArray* array, | 141 bool RecordFixedArrayHelper(HeapObject* parent, FixedArray* array, |
141 int subtype, size_t overhead); | 142 int subtype, size_t overhead); |
142 void RecursivelyRecordFixedArrayHelper(HeapObject* parent, FixedArray* array, | 143 void RecursivelyRecordFixedArrayHelper(HeapObject* parent, FixedArray* array, |
143 int subtype); | 144 int subtype); |
144 template <class HashTable> | 145 template <class HashTable> |
145 void RecordHashTableHelper(HeapObject* parent, HashTable* array, int subtype); | 146 void RecordHashTableHelper(HeapObject* parent, HashTable* array, int subtype); |
146 Heap* heap_; | 147 Heap* heap_; |
147 ObjectStats* stats_; | 148 ObjectStats* stats_; |
148 }; | 149 }; |
149 | 150 |
150 } // namespace internal | 151 } // namespace internal |
151 } // namespace v8 | 152 } // namespace v8 |
152 | 153 |
153 #endif // V8_HEAP_OBJECT_STATS_H_ | 154 #endif // V8_HEAP_OBJECT_STATS_H_ |
OLD | NEW |