Commit e3680e9c authored by hlopko's avatar hlopko Committed by Commit bot

[heap] Move mark-compact specific code to MarkCompactEpilogue

BUG=
LOG=no

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

Cr-Commit-Position: refs/heads/master@{#34941}
parent 02a015b1
...@@ -1324,18 +1324,6 @@ bool Heap::PerformGarbageCollection( ...@@ -1324,18 +1324,6 @@ bool Heap::PerformGarbageCollection(
isolate_->counters()->objs_since_last_young()->Set(0); 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_++; gc_post_processing_depth_++;
{ {
AllowHeapAllocation allow_allocation; AllowHeapAllocation allow_allocation;
...@@ -1458,6 +1446,14 @@ void Heap::MarkCompactEpilogue() { ...@@ -1458,6 +1446,14 @@ void Heap::MarkCompactEpilogue() {
incremental_marking()->Epilogue(); incremental_marking()->Epilogue();
PreprocessStackTraces(); 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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment