Index: src/profile-generator.h |
diff --git a/src/profile-generator.h b/src/profile-generator.h |
index ffa3eb59ec2fa104f8771183b73c63e73b53c5cb..c2a7f8698285baa82f509875f79fc507be930dcb 100644 |
--- a/src/profile-generator.h |
+++ b/src/profile-generator.h |
@@ -710,6 +710,9 @@ class HeapObjectsMap { |
return next_id_ - kObjectIdStep; |
} |
+ void StopHeapObjectsTracking(); |
+ void PushHeapObjectsStats(OutputStream* stream); |
+ |
static SnapshotObjectId GenerateId(v8::RetainedObjectInfo* info); |
static inline SnapshotObjectId GetNthGcSubrootId(int delta); |
@@ -733,6 +736,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 +754,12 @@ class HeapObjectsMap { |
SnapshotObjectId next_id_; |
HashMap entries_map_; |
List<EntryInfo>* entries_; |
+ struct FragmentInfo { |
+ explicit FragmentInfo(SnapshotObjectId id) : id(id), count(0) { } |
+ SnapshotObjectId id; |
+ uint32_t count; |
+ }; |
+ List<FragmentInfo> fragment_infos_; |
DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); |
}; |
@@ -760,6 +771,13 @@ class HeapSnapshotsCollection { |
~HeapSnapshotsCollection(); |
bool is_tracking_objects() { return is_tracking_objects_; } |
+ void PushHeapObjectsStats(OutputStream* stream) { |
+ return ids_.PushHeapObjectsStats(stream); |
+ } |
+ void StartHeapObjectsTracking() { |
+ is_tracking_objects_ = true; |
+ } |
+ void StopHeapObjectsTracking() { ids_.StopHeapObjectsTracking(); } |
HeapSnapshot* NewSnapshot( |
HeapSnapshot::Type type, const char* name, unsigned uid); |