| 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 #ifndef V8_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
| 6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 | 10 |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 700 |
| 701 // True if we are collecting slots to perform evacuation from evacuation | 701 // True if we are collecting slots to perform evacuation from evacuation |
| 702 // candidates. | 702 // candidates. |
| 703 bool compacting_; | 703 bool compacting_; |
| 704 | 704 |
| 705 bool was_marked_incrementally_; | 705 bool was_marked_incrementally_; |
| 706 | 706 |
| 707 // True if concurrent or parallel sweeping is currently in progress. | 707 // True if concurrent or parallel sweeping is currently in progress. |
| 708 bool sweeping_in_progress_; | 708 bool sweeping_in_progress_; |
| 709 | 709 |
| 710 // True if parallel compaction is currently in progress. |
| 711 bool parallel_compaction_in_progress_; |
| 712 |
| 710 // Synchronize sweeper threads. | 713 // Synchronize sweeper threads. |
| 711 base::Semaphore pending_sweeper_jobs_semaphore_; | 714 base::Semaphore pending_sweeper_jobs_semaphore_; |
| 712 | 715 |
| 713 // Synchronize compaction threads. | 716 // Synchronize compaction threads. |
| 714 base::Semaphore pending_compaction_jobs_semaphore_; | 717 base::Semaphore pending_compaction_jobs_semaphore_; |
| 715 | 718 |
| 716 bool evacuation_; | 719 bool evacuation_; |
| 717 | 720 |
| 718 SlotsBufferAllocator slots_buffer_allocator_; | 721 SlotsBufferAllocator slots_buffer_allocator_; |
| 719 | 722 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 NewSpacePage* p); | 869 NewSpacePage* p); |
| 867 | 870 |
| 868 void EvacuateNewSpace(); | 871 void EvacuateNewSpace(); |
| 869 | 872 |
| 870 void EvacuateLiveObjectsFromPage(Page* p); | 873 void EvacuateLiveObjectsFromPage(Page* p); |
| 871 | 874 |
| 872 void EvacuatePages(); | 875 void EvacuatePages(); |
| 873 | 876 |
| 874 void EvacuatePagesInParallel(); | 877 void EvacuatePagesInParallel(); |
| 875 | 878 |
| 879 void WaitUntilCompactionCompleted(); |
| 880 |
| 876 void EvacuateNewSpaceAndCandidates(); | 881 void EvacuateNewSpaceAndCandidates(); |
| 877 | 882 |
| 878 void ReleaseEvacuationCandidates(); | 883 void ReleaseEvacuationCandidates(); |
| 879 | 884 |
| 880 // Moves the pages of the evacuation_candidates_ list to the end of their | 885 // Moves the pages of the evacuation_candidates_ list to the end of their |
| 881 // corresponding space pages list. | 886 // corresponding space pages list. |
| 882 void MoveEvacuationCandidatesToEndOfPagesList(); | 887 void MoveEvacuationCandidatesToEndOfPagesList(); |
| 883 | 888 |
| 884 void SweepSpace(PagedSpace* space, SweeperType sweeper); | 889 void SweepSpace(PagedSpace* space, SweeperType sweeper); |
| 885 | 890 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 private: | 975 private: |
| 971 MarkCompactCollector* collector_; | 976 MarkCompactCollector* collector_; |
| 972 }; | 977 }; |
| 973 | 978 |
| 974 | 979 |
| 975 const char* AllocationSpaceName(AllocationSpace space); | 980 const char* AllocationSpaceName(AllocationSpace space); |
| 976 } | 981 } |
| 977 } // namespace v8::internal | 982 } // namespace v8::internal |
| 978 | 983 |
| 979 #endif // V8_HEAP_MARK_COMPACT_H_ | 984 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |