Reviewers: Rico,

Description:
Heap profiler: enforce compaction before taking a snapshot.

Please review this at http://codereview.chromium.org/3118007/show

Affected files:
  M src/heap-profiler.cc


Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index 8b7135490be09c609e701ef8634ceac41acb3b4f..7668bbc1505d8dad680292bcd47c27c55a4c45ed 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -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();


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to