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

Unified Diff: src/heap/heap.cc

Issue 2735803005: [heap] Start concurrent marking simultaneously with incremental marking. (Closed)
Patch Set: fix test Created 3 years, 8 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 | « src/heap/heap.h ('k') | 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 cfeda5d55711a71cd650131edd145da162d9e986..92ca9a9f9395001389b893e142072e40d07a5c30 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1353,8 +1353,9 @@ bool Heap::PerformGarbageCollection(
MinorMarkCompact();
break;
case SCAVENGER:
- if (fast_promotion_mode_ &&
- CanExpandOldGeneration(new_space()->Size())) {
+ if ((fast_promotion_mode_ &&
+ CanExpandOldGeneration(new_space()->Size())) ||
+ concurrent_marking_->IsTaskPending()) {
tracer()->NotifyYoungGenerationHandling(
YoungGenerationHandling::kFastPromotionDuringScavenge);
EvacuateYoungGeneration();
@@ -1626,8 +1627,10 @@ class ScavengeWeakObjectRetainer : public WeakObjectRetainer {
void Heap::EvacuateYoungGeneration() {
TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_EVACUATE);
- DCHECK(fast_promotion_mode_);
- DCHECK(CanExpandOldGeneration(new_space()->Size()));
+ if (!FLAG_concurrent_marking) {
+ DCHECK(fast_promotion_mode_);
+ DCHECK(CanExpandOldGeneration(new_space()->Size()));
+ }
mark_compact_collector()->sweeper().EnsureNewSpaceCompleted();
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698