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

Unified Diff: src/heap/heap.cc

Issue 2900603004: [heap] Add --stress-incremental-marking flag. (Closed)
Patch Set: fix test Created 3 years, 7 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/flag-definitions.h ('k') | test/cctest/heap/test-array-buffer-tracker.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 b9f633a43990dc6fef572677f5cdca8a7bb718c8..d0fb9a4ff1ff793ce75dabcad6daec7f092245af 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5544,9 +5544,15 @@ bool Heap::ShouldExpandOldGenerationOnSlowAllocation() {
Heap::IncrementalMarkingLimit Heap::IncrementalMarkingLimitReached() {
// Code using an AlwaysAllocateScope assumes that the GC state does not
// change; that implies that no marking steps must be performed.
- if (!incremental_marking()->CanBeActivated() || always_allocate() ||
- PromotedSpaceSizeOfObjects() <=
- IncrementalMarking::kActivationThreshold) {
+ if (!incremental_marking()->CanBeActivated() || always_allocate()) {
+ // Incremental marking is disabled or it is too early to start.
+ return IncrementalMarkingLimit::kNoLimit;
+ }
+ if (FLAG_stress_incremental_marking) {
+ return IncrementalMarkingLimit::kHardLimit;
+ }
+ if (PromotedSpaceSizeOfObjects() <=
+ IncrementalMarking::kActivationThreshold) {
// Incremental marking is disabled or it is too early to start.
return IncrementalMarkingLimit::kNoLimit;
}
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698