| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index 57361e131d614f1ba8c303d68af24d3d8eaaaae2..70285b787949721f0765c668377ce17358a5e94c 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -678,18 +678,25 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
|
| reduce_memory_footprint_ ||
|
| heap()->HasLowAllocationRate(
|
| heap()->tracer()->CurrentAllocationThroughputInBytesPerMillisecond());
|
| -
|
| - if (FLAG_stress_compaction || FLAG_manual_evacuation_candidates_selection) {
|
| + if (FLAG_manual_evacuation_candidates_selection) {
|
| for (size_t i = 0; i < pages.size(); i++) {
|
| Page* p = pages[i].second;
|
| - if (((i % 2 == 0) && FLAG_stress_compaction) ||
|
| - p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) {
|
| + if (p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) {
|
| candidate_count++;
|
| total_live_bytes += pages[i].first;
|
| p->ClearFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
|
| AddEvacuationCandidate(p);
|
| }
|
| }
|
| + } else if (FLAG_stress_compaction) {
|
| + for (size_t i = 0; i < pages.size(); i++) {
|
| + Page* p = pages[i].second;
|
| + if (i % 2 == 0) {
|
| + candidate_count++;
|
| + total_live_bytes += pages[i].first;
|
| + AddEvacuationCandidate(p);
|
| + }
|
| + }
|
| } else {
|
| const int kTargetFragmentationPercent = 50;
|
| const int kMaxEvacuatedBytes = 4 * Page::kPageSize;
|
|
|