| Index: src/profiler/heap-snapshot-generator.cc
|
| diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
|
| index 413f0d934ecee49b667c92f93bb3903512d29a41..e67acef268f1fdc340425ac07f59182287f3232c 100644
|
| --- a/src/profiler/heap-snapshot-generator.cc
|
| +++ b/src/profiler/heap-snapshot-generator.cc
|
| @@ -478,8 +478,8 @@
|
| PrintF("Begin HeapObjectsMap::UpdateHeapObjectsMap. map has %d entries.\n",
|
| entries_map_.occupancy());
|
| }
|
| - heap_->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
|
| - "HeapObjectsMap::UpdateHeapObjectsMap");
|
| + heap_->CollectAllGarbage(Heap::kMakeHeapIterableMask,
|
| + "HeapObjectsMap::UpdateHeapObjectsMap");
|
| HeapIterator iterator(heap_);
|
| for (HeapObject* obj = iterator.next();
|
| obj != NULL;
|
| @@ -1784,10 +1784,8 @@
|
| // to weakly hold their items, and it's impossible to distinguish
|
| // between these cases without processing the array owner first.
|
| bool interrupted =
|
| - IterateAndExtractSinglePass<&V8HeapExplorer::ExtractReferencesPass1>(
|
| - HeapObjectsFiltering::kFilterUnreachable) ||
|
| - IterateAndExtractSinglePass<&V8HeapExplorer::ExtractReferencesPass2>(
|
| - HeapObjectsFiltering::kNoFiltering);
|
| + IterateAndExtractSinglePass<&V8HeapExplorer::ExtractReferencesPass1>() ||
|
| + IterateAndExtractSinglePass<&V8HeapExplorer::ExtractReferencesPass2>();
|
|
|
| if (interrupted) {
|
| filler_ = NULL;
|
| @@ -1798,12 +1796,12 @@
|
| return progress_->ProgressReport(true);
|
| }
|
|
|
| -template <V8HeapExplorer::ExtractReferencesMethod extractor>
|
| -bool V8HeapExplorer::IterateAndExtractSinglePass(
|
| - HeapObjectsFiltering filtering) {
|
| +
|
| +template<V8HeapExplorer::ExtractReferencesMethod extractor>
|
| +bool V8HeapExplorer::IterateAndExtractSinglePass() {
|
| // Now iterate the whole heap.
|
| bool interrupted = false;
|
| - HeapIterator iterator(heap_, filtering);
|
| + HeapIterator iterator(heap_, HeapIterator::kFilterUnreachable);
|
| // Heap iteration with filtering must be finished in any case.
|
| for (HeapObject* obj = iterator.next();
|
| obj != NULL;
|
| @@ -2507,10 +2505,12 @@
|
| // full GC is reachable from the root when computing dominators.
|
| // This is not true for weakly reachable objects.
|
| // As a temporary solution we call GC twice.
|
| - heap_->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
|
| - "HeapSnapshotGenerator::GenerateSnapshot");
|
| - heap_->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
|
| - "HeapSnapshotGenerator::GenerateSnapshot");
|
| + heap_->CollectAllGarbage(
|
| + Heap::kMakeHeapIterableMask,
|
| + "HeapSnapshotGenerator::GenerateSnapshot");
|
| + heap_->CollectAllGarbage(
|
| + Heap::kMakeHeapIterableMask,
|
| + "HeapSnapshotGenerator::GenerateSnapshot");
|
|
|
| #ifdef VERIFY_HEAP
|
| Heap* debug_heap = heap_;
|
| @@ -2559,7 +2559,7 @@
|
|
|
| void HeapSnapshotGenerator::SetProgressTotal(int iterations_count) {
|
| if (control_ == NULL) return;
|
| - HeapIterator iterator(heap_, HeapObjectsFiltering::kFilterUnreachable);
|
| + HeapIterator iterator(heap_, HeapIterator::kFilterUnreachable);
|
| progress_total_ = iterations_count * (
|
| v8_heap_explorer_.EstimateObjectsCount(&iterator) +
|
| dom_explorer_.EstimateObjectsCount());
|
|
|