| 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/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 heap()->map_space()->RefillFreeList(); | 560 heap()->map_space()->RefillFreeList(); |
| 561 | 561 |
| 562 #ifdef VERIFY_HEAP | 562 #ifdef VERIFY_HEAP |
| 563 if (FLAG_verify_heap && !evacuation()) { | 563 if (FLAG_verify_heap && !evacuation()) { |
| 564 VerifyEvacuation(heap_); | 564 VerifyEvacuation(heap_); |
| 565 } | 565 } |
| 566 #endif | 566 #endif |
| 567 } | 567 } |
| 568 | 568 |
| 569 bool MarkCompactCollector::Sweeper::IsSweepingCompleted() { | 569 bool MarkCompactCollector::Sweeper::IsSweepingCompleted() { |
| 570 DCHECK(FLAG_concurrent_sweeping); |
| 570 while (pending_sweeper_tasks_semaphore_.WaitFor( | 571 while (pending_sweeper_tasks_semaphore_.WaitFor( |
| 571 base::TimeDelta::FromSeconds(0))) { | 572 base::TimeDelta::FromSeconds(0))) { |
| 572 num_sweeping_tasks_.Increment(-1); | 573 num_sweeping_tasks_.Increment(-1); |
| 573 } | 574 } |
| 574 return num_sweeping_tasks_.Value() == 0; | 575 return num_sweeping_tasks_.Value() == 0; |
| 575 } | 576 } |
| 576 | 577 |
| 577 const char* AllocationSpaceName(AllocationSpace space) { | 578 const char* AllocationSpaceName(AllocationSpace space) { |
| 578 switch (space) { | 579 switch (space) { |
| 579 case NEW_SPACE: | 580 case NEW_SPACE: |
| (...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4041 // The target is always in old space, we don't have to record the slot in | 4042 // The target is always in old space, we don't have to record the slot in |
| 4042 // the old-to-new remembered set. | 4043 // the old-to-new remembered set. |
| 4043 DCHECK(!heap()->InNewSpace(target)); | 4044 DCHECK(!heap()->InNewSpace(target)); |
| 4044 RecordRelocSlot(host, &rinfo, target); | 4045 RecordRelocSlot(host, &rinfo, target); |
| 4045 } | 4046 } |
| 4046 } | 4047 } |
| 4047 } | 4048 } |
| 4048 | 4049 |
| 4049 } // namespace internal | 4050 } // namespace internal |
| 4050 } // namespace v8 | 4051 } // namespace v8 |
| OLD | NEW |