Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: src/heap/heap.cc

Issue 1812203002: [heap] Move mark-compact specific code to MarkCompactEpilogue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move dcheck over to the MarkCompactEpilogue Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8802266d985654b1e4792f5cddb6fafd409e32da..abbccf09b530657e640938d8d3140fbc8621e144 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1322,18 +1322,6 @@ bool Heap::PerformGarbageCollection(
isolate_->counters()->objs_since_last_young()->Set(0);
- if (collector != SCAVENGER) {
- // Callbacks that fire after this point might trigger nested GCs and
- // restart incremental marking, the assertion can't be moved down.
- DCHECK(incremental_marking()->IsStopped());
-
- // We finished a marking cycle. We can uncommit the marking deque until
- // we start marking again.
- mark_compact_collector()->marking_deque()->Uninitialize();
- mark_compact_collector()->EnsureMarkingDequeIsCommitted(
- MarkCompactCollector::kMinMarkingDequeSize);
- }
-
gc_post_processing_depth_++;
{
AllowHeapAllocation allow_allocation;
@@ -1456,6 +1444,14 @@ void Heap::MarkCompactEpilogue() {
incremental_marking()->Epilogue();
PreprocessStackTraces();
+
+ DCHECK(incremental_marking()->IsStopped());
+
+ // We finished a marking cycle. We can uncommit the marking deque until
+ // we start marking again.
+ mark_compact_collector()->marking_deque()->Uninitialize();
+ mark_compact_collector()->EnsureMarkingDequeIsCommitted(
+ MarkCompactCollector::kMinMarkingDequeSize);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698