| 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 #include "src/heap/store-buffer.h" | 10 #include "src/heap/store-buffer.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 case CODE_SPACE: | 570 case CODE_SPACE: |
| 571 return &swept_code_space_pages_; | 571 return &swept_code_space_pages_; |
| 572 case MAP_SPACE: | 572 case MAP_SPACE: |
| 573 return &swept_map_space_pages_; | 573 return &swept_map_space_pages_; |
| 574 default: | 574 default: |
| 575 UNREACHABLE(); | 575 UNREACHABLE(); |
| 576 } | 576 } |
| 577 return nullptr; | 577 return nullptr; |
| 578 } | 578 } |
| 579 | 579 |
| 580 std::vector<std::pair<void*, void*>>& wrappers_to_trace() { |
| 581 return wrappers_to_trace_; |
| 582 } |
| 583 |
| 584 bool UsingEmbedderHeapTracer() const; |
| 585 |
| 580 private: | 586 private: |
| 581 class EvacuateNewSpaceVisitor; | 587 class EvacuateNewSpaceVisitor; |
| 582 class EvacuateOldSpaceVisitor; | 588 class EvacuateOldSpaceVisitor; |
| 583 class EvacuateVisitorBase; | 589 class EvacuateVisitorBase; |
| 584 class HeapObjectVisitor; | 590 class HeapObjectVisitor; |
| 585 class SweeperTask; | 591 class SweeperTask; |
| 586 | 592 |
| 587 typedef std::vector<Page*> SweepingList; | 593 typedef std::vector<Page*> SweepingList; |
| 588 | 594 |
| 589 explicit MarkCompactCollector(Heap* heap); | 595 explicit MarkCompactCollector(Heap* heap); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 static void VisitObject(HeapObject* obj); | 812 static void VisitObject(HeapObject* obj); |
| 807 | 813 |
| 808 friend class UnmarkObjectVisitor; | 814 friend class UnmarkObjectVisitor; |
| 809 static void UnmarkObject(HeapObject* obj); | 815 static void UnmarkObject(HeapObject* obj); |
| 810 #endif | 816 #endif |
| 811 | 817 |
| 812 Heap* heap_; | 818 Heap* heap_; |
| 813 base::VirtualMemory* marking_deque_memory_; | 819 base::VirtualMemory* marking_deque_memory_; |
| 814 size_t marking_deque_memory_committed_; | 820 size_t marking_deque_memory_committed_; |
| 815 MarkingDeque marking_deque_; | 821 MarkingDeque marking_deque_; |
| 822 std::vector<std::pair<void*, void*>> wrappers_to_trace_; |
| 823 |
| 816 CodeFlusher* code_flusher_; | 824 CodeFlusher* code_flusher_; |
| 817 bool have_code_to_deoptimize_; | 825 bool have_code_to_deoptimize_; |
| 818 | 826 |
| 819 List<Page*> evacuation_candidates_; | 827 List<Page*> evacuation_candidates_; |
| 820 List<NewSpacePage*> newspace_evacuation_candidates_; | 828 List<NewSpacePage*> newspace_evacuation_candidates_; |
| 821 | 829 |
| 822 base::Mutex swept_pages_mutex_; | 830 base::Mutex swept_pages_mutex_; |
| 823 List<Page*> swept_old_space_pages_; | 831 List<Page*> swept_old_space_pages_; |
| 824 List<Page*> swept_code_space_pages_; | 832 List<Page*> swept_code_space_pages_; |
| 825 List<Page*> swept_map_space_pages_; | 833 List<Page*> swept_map_space_pages_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 private: | 868 private: |
| 861 MarkCompactCollector* collector_; | 869 MarkCompactCollector* collector_; |
| 862 }; | 870 }; |
| 863 | 871 |
| 864 | 872 |
| 865 const char* AllocationSpaceName(AllocationSpace space); | 873 const char* AllocationSpaceName(AllocationSpace space); |
| 866 } // namespace internal | 874 } // namespace internal |
| 867 } // namespace v8 | 875 } // namespace v8 |
| 868 | 876 |
| 869 #endif // V8_HEAP_MARK_COMPACT_H_ | 877 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |