Chromium Code Reviews| 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; |
| } |