Chromium Code Reviews| Index: src/profile-generator.h |
| diff --git a/src/profile-generator.h b/src/profile-generator.h |
| index ffa3eb59ec2fa104f8771183b73c63e73b53c5cb..46436eae9d8db8d0ee9add2e05cf0478d024fcdb 100644 |
| --- a/src/profile-generator.h |
| +++ b/src/profile-generator.h |
| @@ -710,6 +710,10 @@ class HeapObjectsMap { |
| return next_id_ - kObjectIdStep; |
| } |
| + void StartHeapObjectsTracking(); |
| + void StopHeapObjectsTracking(); |
| + void PushHeapObjectsStats(OutputStream* stream); |
| + |
| static SnapshotObjectId GenerateId(v8::RetainedObjectInfo* info); |
| static inline SnapshotObjectId GetNthGcSubrootId(int delta); |
| @@ -733,6 +737,8 @@ class HeapObjectsMap { |
| void AddEntry(Address addr, SnapshotObjectId id); |
| SnapshotObjectId FindEntry(Address addr); |
| + SnapshotObjectId FindOrAddEntry(Address addr); |
| + void UpdateHeapObjectsMap(); |
| void RemoveDeadEntries(); |
| static bool AddressesMatch(void* key1, void* key2) { |
| @@ -749,6 +755,12 @@ class HeapObjectsMap { |
| SnapshotObjectId next_id_; |
| HashMap entries_map_; |
| List<EntryInfo>* entries_; |
| + struct FragmentInfo { |
|
mnaganov (inactive)
2012/04/11 14:35:40
Please move under EntryInfo definition.
|
| + explicit FragmentInfo(SnapshotObjectId id) : id(id), count(0) { } |
| + SnapshotObjectId id; |
|
mnaganov (inactive)
2012/04/11 14:35:40
'id' isn't very descriptive. Should it be somethin
|
| + uint32_t count; |
| + }; |
| + List<FragmentInfo> fragment_infos_; |
| DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); |
| }; |
| @@ -760,6 +772,14 @@ class HeapSnapshotsCollection { |
| ~HeapSnapshotsCollection(); |
| bool is_tracking_objects() { return is_tracking_objects_; } |
| + void PushHeapObjectsStats(OutputStream* stream) { |
| + return ids_.PushHeapObjectsStats(stream); |
| + } |
| + void StartHeapObjectsTracking() { |
|
mnaganov (inactive)
2012/04/11 14:35:40
I think, non-trivial methods should be implemented
|
| + is_tracking_objects_ = true; |
| + ids_.StartHeapObjectsTracking(); |
| + } |
| + void StopHeapObjectsTracking() { ids_.StopHeapObjectsTracking(); } |
| HeapSnapshot* NewSnapshot( |
| HeapSnapshot::Type type, const char* name, unsigned uid); |