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

Unified Diff: src/heap/heap.cc

Issue 1133153003: Never uncommit the whole marking deque in case we can't get it back (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge Created 5 years, 6 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 | src/heap/incremental-marking.cc » ('j') | 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 c5f5f70f8983d635667e24d9adc1858125c33c5b..6ef3607fc56180c07a424a63dfe63a0b3b8ee661 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1233,9 +1233,17 @@ bool Heap::PerformGarbageCollection(
isolate_->counters()->objs_since_last_young()->Set(0);
- // Callbacks that fire after this point might trigger nested GCs and
- // restart incremental marking, the assertion can't be moved down.
- DCHECK(collector == SCAVENGER || incremental_marking()->IsStopped());
+ 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_++;
{
@@ -1258,9 +1266,6 @@ bool Heap::PerformGarbageCollection(
SetOldGenerationAllocationLimit(
PromotedSpaceSizeOfObjects(),
tracer()->CurrentAllocationThroughputInBytesPerMillisecond());
- // We finished a marking cycle. We can uncommit the marking deque until
- // we start marking again.
- mark_compact_collector_.UncommitMarkingDeque();
}
{
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698