Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 401f4f7948adc09cb845390ef7f37036fa179aee..45db7dd065b5231df81003bff572a4530366340a 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -1273,7 +1273,14 @@ void Heap::Scavenge() { |
| incremental_marking()->PrepareForScavenge(); |
| - AdvanceSweepers(static_cast<int>(new_space_.Size())); |
| + MarkCompactCollector* mark_compact = mark_compact_collector(); |
| + |
| + if (!mark_compact->AreSweeperThreadsActivated()) { |
| + AdvanceSweepers(static_cast<int>(new_space_.Size())); |
| + } else if (FLAG_concurrent_sweeping) { |
| + mark_compact->StealMemoryFromSweeperThreads(paged_space(OLD_DATA_SPACE)); |
| + mark_compact->StealMemoryFromSweeperThreads(paged_space(OLD_POINTER_SPACE)); |
| + } |
|
Michael Starzinger
2013/01/28 16:30:18
What we actually wanna ensure here is that we made
Hannes Payer (out of office)
2013/01/30 10:11:27
Right, but this changes the current non-parallel n
|
| // Flip the semispaces. After flipping, to space is empty, from space has |
| // live objects. |
| @@ -5374,7 +5381,8 @@ bool Heap::IdleNotification(int hint) { |
|
Michael Starzinger
2013/01/28 16:30:18
I know it's not your change, but drop one of the t
Hannes Payer (out of office)
2013/01/30 10:11:27
Done.
|
| if (incremental_marking()->IsStopped()) { |
| - if (!IsSweepingComplete() && |
| + if (!mark_compact_collector()->AreSweeperThreadsActivated() && |
| + !IsSweepingComplete() && |
| !AdvanceSweepers(static_cast<int>(step_size))) { |
| return false; |
| } |