Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index 929064489bc2115bc0bdaf009cb0cde42b290a46..b8f9ab3d38711758300412254b6ae1a9fed371d8 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -611,7 +611,8 @@ int HeapObjectsMap::FindUntrackedObjects() { |
} |
-SnapshotObjectId HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) { |
+SnapshotObjectId HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream, |
+ int64_t* timestamp_us) { |
UpdateHeapObjectsMap(); |
time_intervals_.Add(TimeInterval(next_id_)); |
int prefered_chunk_size = stream->GetChunkSize(); |
@@ -653,6 +654,10 @@ SnapshotObjectId HeapObjectsMap::PushHeapObjectsStats(OutputStream* stream) { |
if (result == OutputStream::kAbort) return last_assigned_id(); |
} |
stream->EndOfStream(); |
+ if (timestamp_us) { |
+ *timestamp_us = (time_intervals_.last().timestamp - |
+ time_intervals_[0].timestamp).InMicroseconds(); |
+ } |
return last_assigned_id(); |
} |