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

Unified Diff: src/heap/heap.cc

Issue 2900603004: [heap] Add --stress-incremental-marking flag. (Closed)
Patch Set: rebase 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..05466a2c99fa69afdf899defbbae9a7a52de247a 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5544,9 +5544,17 @@ 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) {
+ // If there is high memory pressure or stress testing is enabled, then
+ // start marking immediately.
Hannes Payer (out of office) 2017/05/29 08:46:21 This is unrelated of memory pressure.
ulan 2017/05/29 09:06:00 Left-over comment, removed.
+ 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