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

Unified Diff: src/heap/incremental-marking.cc

Issue 1077153004: Reland: Fix logic for incremental marking steps on tenured allocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge up 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 | « src/heap/incremental-marking.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 22051eaab2d5793681dbd6ba3df3ccfd1495dfec..0a7e9c9584db27f6783e66f918eba88c3bb233a3 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -825,10 +825,16 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
+ // If we are stressing the GC, then always return the bump allocation area to
+ // the free list here, which will cause a crash if the top and limit are not
+ // up to date.
+ if (FLAG_gc_interval != -1) {
+ heap()->old_space()->ReturnLinearAllocationAreaToFreeList();
+ }
if (IsStopped() && ShouldActivateEvenWithoutIdleNotification()) {
Start(Heap::kNoGCFlags);
} else {
- Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD);
+ Step(allocated * kOldSpaceAllocationMarkingFactor, GC_VIA_STACK_GUARD);
}
}
@@ -910,8 +916,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
ForceMarkingAction marking,
ForceCompletionAction completion) {
if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking ||
- !FLAG_incremental_marking_steps ||
- (state_ != SWEEPING && state_ != MARKING)) {
+ !CanDoSteps()) {
return 0;
}
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698