Verify evacuation when sweeping is completed.
authorhpayer <hpayer@chromium.org>
Tue, 31 Mar 2015 15:39:37 +0000 (08:39 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 31 Mar 2015 15:39:45 +0000 (15:39 +0000)
BUG=

Review URL: https://codereview.chromium.org/1050543002

Cr-Commit-Position: refs/heads/master@{#27549}

src/heap/mark-compact.cc

index 1132de8..c7b80e1 100644 (file)
@@ -3707,11 +3707,6 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
                              GCTracer::Scope::MC_EVACUATE_PAGES);
     EvacuationScope evacuation_scope(this);
     EvacuatePages();
-#ifdef VERIFY_HEAP
-    if (FLAG_verify_heap && !sweeping_in_progress_) {
-      VerifyEvacuation(heap());
-    }
-#endif
   }
 
   // Second pass: find pointers to new space and update them.
@@ -4496,6 +4491,12 @@ void MarkCompactCollector::SweepSpaces() {
     heap_->tracer()->AddSweepingTime(base::OS::TimeCurrentMillis() -
                                      start_time);
   }
+
+#ifdef VERIFY_HEAP
+  if (FLAG_verify_heap && !sweeping_in_progress_) {
+    VerifyEvacuation(heap());
+  }
+#endif
 }