| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
| 9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
| 10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 // Ready to start incremental marking. | 570 // Ready to start incremental marking. |
| 571 if (FLAG_trace_incremental_marking) { | 571 if (FLAG_trace_incremental_marking) { |
| 572 PrintF("[IncrementalMarking] Running\n"); | 572 PrintF("[IncrementalMarking] Running\n"); |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 | 575 |
| 576 void IncrementalMarking::StartBlackAllocation() { | 576 void IncrementalMarking::StartBlackAllocation() { |
| 577 DCHECK(FLAG_black_allocation); | 577 DCHECK(FLAG_black_allocation); |
| 578 DCHECK(IsMarking()); | 578 DCHECK(IsMarking()); |
| 579 black_allocation_ = true; | 579 black_allocation_ = true; |
| 580 PagedSpaces spaces(heap()); | 580 OldSpace* old_space = heap()->old_space(); |
| 581 for (PagedSpace* space = spaces.next(); space != NULL; | 581 old_space->EmptyAllocationInfo(); |
| 582 space = spaces.next()) { | 582 old_space->free_list()->Reset(); |
| 583 space->EmptyAllocationInfo(); | |
| 584 space->free_list()->Reset(); | |
| 585 } | |
| 586 if (FLAG_trace_incremental_marking) { | 583 if (FLAG_trace_incremental_marking) { |
| 587 PrintF("[IncrementalMarking] Black allocation started\n"); | 584 PrintF("[IncrementalMarking] Black allocation started\n"); |
| 588 } | 585 } |
| 589 } | 586 } |
| 590 | 587 |
| 591 void IncrementalMarking::FinishBlackAllocation() { | 588 void IncrementalMarking::FinishBlackAllocation() { |
| 592 black_allocation_ = false; | 589 black_allocation_ = false; |
| 593 if (FLAG_trace_incremental_marking) { | 590 if (FLAG_trace_incremental_marking) { |
| 594 PrintF("[IncrementalMarking] Black allocation finished\n"); | 591 PrintF("[IncrementalMarking] Black allocation finished\n"); |
| 595 } | 592 } |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1239 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1243 idle_marking_delay_counter_++; | 1240 idle_marking_delay_counter_++; |
| 1244 } | 1241 } |
| 1245 | 1242 |
| 1246 | 1243 |
| 1247 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1244 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1248 idle_marking_delay_counter_ = 0; | 1245 idle_marking_delay_counter_ = 0; |
| 1249 } | 1246 } |
| 1250 } // namespace internal | 1247 } // namespace internal |
| 1251 } // namespace v8 | 1248 } // namespace v8 |
| OLD | NEW |