Index: src/heap-profiler.cc |
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc |
index e66af3364d865b018bdb8110af24e1087555e8b9..036b9e3458140b8aed3327bc25e4dbdfd240c847 100644 |
--- a/src/heap-profiler.cc |
+++ b/src/heap-profiler.cc |
@@ -35,7 +35,8 @@ namespace internal { |
HeapProfiler::HeapProfiler(Heap* heap) |
: snapshots_(new HeapSnapshotsCollection(heap)), |
- next_snapshot_uid_(1) { |
+ next_snapshot_uid_(1), |
+ is_tracking_allocations_(false) { |
} |
@@ -132,14 +133,50 @@ SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Object> obj) { |
} |
-void HeapProfiler::ObjectMoveEvent(Address from, Address to) { |
- snapshots_->ObjectMoveEvent(from, to); |
+void HeapProfiler::ObjectMoveEvent(Address from, Address to, int size) { |
+ snapshots_->ObjectMoveEvent(from, to, size); |
} |
+ |
+void HeapProfiler::NewObjectEvent(Address addr, int size) { |
+ snapshots_->NewObjectEvent(addr, size); |
+} |
+ |
+ |
void HeapProfiler::SetRetainedObjectInfo(UniqueId id, |
RetainedObjectInfo* info) { |
// TODO(yurus, marja): Don't route this information through GlobalHandles. |
heap()->isolate()->global_handles()->SetRetainedObjectInfo(id, info); |
} |
+ |
+bool* HeapProfiler::is_tracking_allocations_address() { |
+ return &is_tracking_allocations_; |
+} |
+ |
+ |
+void HeapProfiler::StartHeapAllocationsRecording() { |
+ StartHeapObjectsTracking(); |
+ is_tracking_allocations_ = true; |
+} |
+ |
+ |
+void HeapProfiler::StopHeapAllocationsRecording() { |
+ StopHeapObjectsTracking(); |
+ is_tracking_allocations_ = false; |
+} |
+ |
+ |
+void HeapProfiler::RecordObjectAllocationFromMasm(Isolate* isolate, |
+ Address obj, |
+ int size) { |
+ isolate->heap_profiler()->NewObjectEvent(obj, size); |
+} |
+ |
+ |
+int HeapProfiler::FindUntrackedObjects() { |
+ return snapshots_->FindUntrackedObjects(); |
+} |
+ |
+ |
} } // namespace v8::internal |