| Index: src/heap-profiler.cc
|
| diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
|
| index 8be6f27685e97135b3720c101aed25abed646342..cda1a878e632ba25e3515263e19c216cb08aaeac 100644
|
| --- a/src/heap-profiler.cc
|
| +++ b/src/heap-profiler.cc
|
| @@ -33,7 +33,6 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -
|
| HeapProfiler::HeapProfiler()
|
| : snapshots_(new HeapSnapshotsCollection()),
|
| next_snapshot_uid_(1) {
|
| @@ -86,6 +85,24 @@ HeapSnapshot* HeapProfiler::TakeSnapshot(String* name,
|
| }
|
|
|
|
|
| +void HeapProfiler::StartHeapObjectsTracking() {
|
| + ASSERT(Isolate::Current()->heap_profiler() != NULL);
|
| + Isolate::Current()->heap_profiler()->StartHeapObjectsTrackingImpl();
|
| +}
|
| +
|
| +
|
| +void HeapProfiler::StopHeapObjectsTracking() {
|
| + ASSERT(Isolate::Current()->heap_profiler() != NULL);
|
| + Isolate::Current()->heap_profiler()->StopHeapObjectsTrackingImpl();
|
| +}
|
| +
|
| +
|
| +void HeapProfiler::PushHeapObjectsStats(v8::OutputStream* stream) {
|
| + ASSERT(Isolate::Current()->heap_profiler() != NULL);
|
| + return Isolate::Current()->heap_profiler()->PushHeapObjectsStatsImpl(stream);
|
| +}
|
| +
|
| +
|
| void HeapProfiler::DefineWrapperClass(
|
| uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback) {
|
| ASSERT(class_id != v8::HeapProfiler::kPersistentHandleNoClassId);
|
| @@ -136,6 +153,20 @@ HeapSnapshot* HeapProfiler::TakeSnapshotImpl(String* name,
|
| return TakeSnapshotImpl(snapshots_->names()->GetName(name), type, control);
|
| }
|
|
|
| +void HeapProfiler::StartHeapObjectsTrackingImpl() {
|
| + snapshots_->StartHeapObjectsTracking();
|
| +}
|
| +
|
| +
|
| +void HeapProfiler::PushHeapObjectsStatsImpl(OutputStream* stream) {
|
| + snapshots_->PushHeapObjectsStats(stream);
|
| +}
|
| +
|
| +
|
| +void HeapProfiler::StopHeapObjectsTrackingImpl() {
|
| + snapshots_->StopHeapObjectsTracking();
|
| +}
|
| +
|
|
|
| int HeapProfiler::GetSnapshotsCount() {
|
| HeapProfiler* profiler = Isolate::Current()->heap_profiler();
|
|
|