Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index ac2465e35c3a98d8a26c0d4f0b4269c9cdec5d91..fc5b469e9656d94d3250766d3290fc44aa84721d 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -242,14 +242,14 @@ static void TraceFragmentation(PagedSpace* space) { |
| } |
| -bool MarkCompactCollector::StartCompaction() { |
| +bool MarkCompactCollector::StartCompaction(bool incremental) { |
| if (!compacting_) { |
| ASSERT(evacuation_candidates_.length() == 0); |
| CollectEvacuationCandidates(heap()->old_pointer_space()); |
| CollectEvacuationCandidates(heap()->old_data_space()); |
| - if (FLAG_compact_code_space) { |
| + if (!incremental) { |
|
Erik Corry
2012/02/07 08:12:58
Please reverse the sense and order of this if.
|
| CollectEvacuationCandidates(heap()->code_space()); |
| } else if (FLAG_trace_fragmentation) { |
| TraceFragmentation(heap()->code_space()); |
| @@ -697,7 +697,7 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) { |
| // Don't start compaction if we are in the middle of incremental |
| // marking cycle. We did not collect any slots. |
| if (!FLAG_never_compact && !was_marked_incrementally_) { |
| - StartCompaction(); |
| + StartCompaction(false); |
| } |
| PagedSpaces spaces; |