Index: src/heap-snapshot-generator.h |
diff --git a/src/heap-snapshot-generator.h b/src/heap-snapshot-generator.h |
index 55d36ce946af66d4a1f6d9c94c2e72b0d724ac5a..ef71ce6ff174836bb2d2b83bad6175a9b19b79ca 100644 |
--- a/src/heap-snapshot-generator.h |
+++ b/src/heap-snapshot-generator.h |
@@ -194,6 +194,16 @@ class HeapSnapshot { |
class HeapObjectsMap { |
public: |
+ struct TimeInterval { |
+ explicit TimeInterval(SnapshotObjectId id) |
+ : id(id), size(0), count(0), timestamp(base::TimeTicks::Now()) {} |
+ SnapshotObjectId last_assigned_id() const { return id - kObjectIdStep; } |
+ SnapshotObjectId id; |
+ uint32_t size; |
+ uint32_t count; |
+ base::TimeTicks timestamp; |
+ }; |
+ |
explicit HeapObjectsMap(Heap* heap); |
Heap* heap() const { return heap_; } |
@@ -210,6 +220,7 @@ class HeapObjectsMap { |
void StopHeapObjectsTracking(); |
SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); |
+ const List<TimeInterval>& samples() const { return time_intervals_; } |
size_t GetUsedMemorySize() const; |
SnapshotObjectId GenerateId(v8::RetainedObjectInfo* info); |
@@ -236,12 +247,6 @@ class HeapObjectsMap { |
unsigned int size; |
bool accessed; |
}; |
- struct TimeInterval { |
- explicit TimeInterval(SnapshotObjectId id) : id(id), size(0), count(0) { } |
- SnapshotObjectId id; |
- uint32_t size; |
- uint32_t count; |
- }; |
SnapshotObjectId next_id_; |
HashMap entries_map_; |
@@ -584,6 +589,7 @@ class HeapSnapshotJSONSerializer { |
void SerializeTraceTree(); |
void SerializeTraceNode(AllocationTraceNode* node); |
void SerializeTraceNodeInfos(); |
+ void SerializeSamples(); |
void SerializeString(const unsigned char* s); |
void SerializeStrings(); |