| Index: src/mark-compact.cc
|
| ===================================================================
|
| --- src/mark-compact.cc (revision 9579)
|
| +++ src/mark-compact.cc (working copy)
|
| @@ -433,7 +433,15 @@
|
| if (it.has_next()) it.next(); // Never compact the first page.
|
| while (it.has_next()) {
|
| Page* p = it.next();
|
| - if (space->IsFragmented(p)) {
|
| + bool evacuate = false;
|
| + if (FLAG_stress_compaction) {
|
| + int counter = space->heap()->ms_count();
|
| + uintptr_t page_number = reinterpret_cast<uintptr_t>(p) >> kPageSizeBits;
|
| + if ((counter & 1) == (page_number & 1)) evacuate = true;
|
| + } else {
|
| + if (space->IsFragmented(p)) evacuate = true;
|
| + }
|
| + if (evacuate) {
|
| AddEvacuationCandidate(p);
|
| count++;
|
| } else {
|
|
|