| Index: src/heap-profiler.cc
|
| diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
|
| index c78f474472a5fde56f7bf3206a7d68caba079eba..4815f8264fd0ca985c819d7cfee8b1b9423a2e08 100644
|
| --- a/src/heap-profiler.cc
|
| +++ b/src/heap-profiler.cc
|
| @@ -326,6 +326,13 @@ HeapProfiler::~HeapProfiler() {
|
| delete snapshots_;
|
| }
|
|
|
| +
|
| +void HeapProfiler::ResetSnapshots() {
|
| + delete snapshots_;
|
| + snapshots_ = new HeapSnapshotsCollection();
|
| +}
|
| +
|
| +
|
| #endif // ENABLE_LOGGING_AND_PROFILING
|
|
|
| void HeapProfiler::Setup() {
|
| @@ -450,6 +457,13 @@ HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) {
|
| }
|
|
|
|
|
| +void HeapProfiler::DeleteAllSnapshots() {
|
| + HeapProfiler* profiler = Isolate::Current()->heap_profiler();
|
| + ASSERT(profiler != NULL);
|
| + profiler->ResetSnapshots();
|
| +}
|
| +
|
| +
|
| void HeapProfiler::ObjectMoveEvent(Address from, Address to) {
|
| snapshots_->ObjectMoveEvent(from, to);
|
| }
|
|
|