OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 FreeList* free_list); | 683 FreeList* free_list); |
684 | 684 |
685 void WaitUntilSweepingCompleted(); | 685 void WaitUntilSweepingCompleted(); |
686 | 686 |
687 intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); | 687 intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); |
688 | 688 |
689 bool AreSweeperThreadsActivated(); | 689 bool AreSweeperThreadsActivated(); |
690 | 690 |
691 bool IsConcurrentSweepingInProgress(); | 691 bool IsConcurrentSweepingInProgress(); |
692 | 692 |
693 void FinalizeSweeping(); | |
694 | |
695 void set_sequential_sweeping(bool sequential_sweeping) { | 693 void set_sequential_sweeping(bool sequential_sweeping) { |
696 sequential_sweeping_ = sequential_sweeping; | 694 sequential_sweeping_ = sequential_sweeping; |
697 } | 695 } |
698 | 696 |
699 bool sequential_sweeping() const { | 697 bool sequential_sweeping() const { |
700 return sequential_sweeping_; | 698 return sequential_sweeping_; |
701 } | 699 } |
702 | 700 |
703 // Parallel marking support. | 701 // Parallel marking support. |
704 void MarkInParallel(); | 702 void MarkInParallel(); |
705 | 703 |
706 void WaitUntilMarkingCompleted(); | 704 void WaitUntilMarkingCompleted(); |
707 | 705 |
708 private: | 706 private: |
709 MarkCompactCollector(); | 707 MarkCompactCollector(); |
710 ~MarkCompactCollector(); | 708 ~MarkCompactCollector(); |
711 | 709 |
712 bool MarkInvalidatedCode(); | 710 bool MarkInvalidatedCode(); |
713 void RemoveDeadInvalidatedCode(); | 711 void RemoveDeadInvalidatedCode(); |
714 void ProcessInvalidatedCode(ObjectVisitor* visitor); | 712 void ProcessInvalidatedCode(ObjectVisitor* visitor); |
715 | 713 |
| 714 void UnlinkEvacuationCandidates(); |
716 void ReleaseEvacuationCandidates(); | 715 void ReleaseEvacuationCandidates(); |
717 | 716 |
718 void StartSweeperThreads(); | 717 void StartSweeperThreads(); |
719 | 718 |
720 #ifdef DEBUG | 719 #ifdef DEBUG |
721 enum CollectorState { | 720 enum CollectorState { |
722 IDLE, | 721 IDLE, |
723 PREPARE_GC, | 722 PREPARE_GC, |
724 MARK_LIVE_OBJECTS, | 723 MARK_LIVE_OBJECTS, |
725 SWEEP_SPACES, | 724 SWEEP_SPACES, |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 private: | 921 private: |
923 MarkCompactCollector* collector_; | 922 MarkCompactCollector* collector_; |
924 }; | 923 }; |
925 | 924 |
926 | 925 |
927 const char* AllocationSpaceName(AllocationSpace space); | 926 const char* AllocationSpaceName(AllocationSpace space); |
928 | 927 |
929 } } // namespace v8::internal | 928 } } // namespace v8::internal |
930 | 929 |
931 #endif // V8_MARK_COMPACT_H_ | 930 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |