Heap profiler: enforce compaction before taking a snapshot.

Review URL: http://codereview.chromium.org/3118007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mikhail.naganov@gmail.com 2010-08-11 09:54:30 +00:00
parent 0765b6ea3e
commit 5e28c3e620

View File

@ -360,7 +360,7 @@ HeapSnapshot* HeapProfiler::TakeSnapshot(String* name) {
HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name) {
Heap::CollectAllGarbage(false);
Heap::CollectAllGarbage(true);
HeapSnapshot* result = snapshots_->NewSnapshot(name, next_snapshot_uid_++);
HeapSnapshotGenerator generator(result);
generator.GenerateSnapshot();