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

Unified Diff: src/heap/mark-compact.cc

Issue 1157293002: Fix cctest/test-unboxed-doubles/IncrementalWriteBarrierObjectShiftFieldsRight after 5e87a0. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698