Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: src/mark-compact.h

Issue 143633007: A64: Synchronize with r18764. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/macros.py ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate); 564 typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate);
565 565
566 // Pointer to member function, used in IterateLiveObjects. 566 // Pointer to member function, used in IterateLiveObjects.
567 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj); 567 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj);
568 568
569 // Set the global flags, it must be called before Prepare to take effect. 569 // Set the global flags, it must be called before Prepare to take effect.
570 inline void SetFlags(int flags); 570 inline void SetFlags(int flags);
571 571
572 static void Initialize(); 572 static void Initialize();
573 573
574 void SetUp();
575
574 void TearDown(); 576 void TearDown();
575 577
576 void CollectEvacuationCandidates(PagedSpace* space); 578 void CollectEvacuationCandidates(PagedSpace* space);
577 579
578 void AddEvacuationCandidate(Page* p); 580 void AddEvacuationCandidate(Page* p);
579 581
580 // Prepares for GC by resetting relocation info in old and map spaces and 582 // Prepares for GC by resetting relocation info in old and map spaces and
581 // choosing spaces to compact. 583 // choosing spaces to compact.
582 void Prepare(GCTracer* tracer); 584 void Prepare(GCTracer* tracer);
583 585
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 710
709 void ClearMarkbits(); 711 void ClearMarkbits();
710 712
711 bool abort_incremental_marking() const { return abort_incremental_marking_; } 713 bool abort_incremental_marking() const { return abort_incremental_marking_; }
712 714
713 bool is_compacting() const { return compacting_; } 715 bool is_compacting() const { return compacting_; }
714 716
715 MarkingParity marking_parity() { return marking_parity_; } 717 MarkingParity marking_parity() { return marking_parity_; }
716 718
717 // Concurrent and parallel sweeping support. 719 // Concurrent and parallel sweeping support.
718 void SweepInParallel(PagedSpace* space, 720 void SweepInParallel(PagedSpace* space);
719 FreeList* private_free_list,
720 FreeList* free_list);
721 721
722 void WaitUntilSweepingCompleted(); 722 void WaitUntilSweepingCompleted();
723 723
724 intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); 724 intptr_t RefillFreeLists(PagedSpace* space);
725 725
726 bool AreSweeperThreadsActivated(); 726 bool AreSweeperThreadsActivated();
727 727
728 bool IsConcurrentSweepingInProgress(); 728 bool IsConcurrentSweepingInProgress();
729 729
730 void set_sequential_sweeping(bool sequential_sweeping) { 730 void set_sequential_sweeping(bool sequential_sweeping) {
731 sequential_sweeping_ = sequential_sweeping; 731 sequential_sweeping_ = sequential_sweeping;
732 } 732 }
733 733
734 bool sequential_sweeping() const { 734 bool sequential_sweeping() const {
735 return sequential_sweeping_; 735 return sequential_sweeping_;
736 } 736 }
737 737
738 // Mark the global table which maps weak objects to dependent code without 738 // Mark the global table which maps weak objects to dependent code without
739 // marking its contents. 739 // marking its contents.
740 void MarkWeakObjectToCodeTable(); 740 void MarkWeakObjectToCodeTable();
741 741
742 // Special case for processing weak references in a full collection. We need 742 // Special case for processing weak references in a full collection. We need
743 // to artifically keep AllocationSites alive for a time. 743 // to artifically keep AllocationSites alive for a time.
744 void MarkAllocationSite(AllocationSite* site); 744 void MarkAllocationSite(AllocationSite* site);
745 745
746 private: 746 private:
747 MarkCompactCollector(); 747 explicit MarkCompactCollector(Heap* heap);
748 ~MarkCompactCollector(); 748 ~MarkCompactCollector();
749 749
750 bool MarkInvalidatedCode(); 750 bool MarkInvalidatedCode();
751 bool WillBeDeoptimized(Code* code); 751 bool WillBeDeoptimized(Code* code);
752 void RemoveDeadInvalidatedCode(); 752 void RemoveDeadInvalidatedCode();
753 void ProcessInvalidatedCode(ObjectVisitor* visitor); 753 void ProcessInvalidatedCode(ObjectVisitor* visitor);
754 754
755 void UnlinkEvacuationCandidates(); 755 void UnlinkEvacuationCandidates();
756 void ReleaseEvacuationCandidates(); 756 void ReleaseEvacuationCandidates();
757 757
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 950
951 Heap* heap_; 951 Heap* heap_;
952 MarkingDeque marking_deque_; 952 MarkingDeque marking_deque_;
953 CodeFlusher* code_flusher_; 953 CodeFlusher* code_flusher_;
954 Object* encountered_weak_collections_; 954 Object* encountered_weak_collections_;
955 bool have_code_to_deoptimize_; 955 bool have_code_to_deoptimize_;
956 956
957 List<Page*> evacuation_candidates_; 957 List<Page*> evacuation_candidates_;
958 List<Code*> invalidated_code_; 958 List<Code*> invalidated_code_;
959 959
960 SmartPointer<FreeList> free_list_old_data_space_;
961 SmartPointer<FreeList> free_list_old_pointer_space_;
962
960 friend class Heap; 963 friend class Heap;
961 }; 964 };
962 965
963 966
964 class MarkBitCellIterator BASE_EMBEDDED { 967 class MarkBitCellIterator BASE_EMBEDDED {
965 public: 968 public:
966 explicit MarkBitCellIterator(MemoryChunk* chunk) 969 explicit MarkBitCellIterator(MemoryChunk* chunk)
967 : chunk_(chunk) { 970 : chunk_(chunk) {
968 last_cell_index_ = Bitmap::IndexToCell( 971 last_cell_index_ = Bitmap::IndexToCell(
969 Bitmap::CellAlignIndex( 972 Bitmap::CellAlignIndex(
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 private: 1022 private:
1020 MarkCompactCollector* collector_; 1023 MarkCompactCollector* collector_;
1021 }; 1024 };
1022 1025
1023 1026
1024 const char* AllocationSpaceName(AllocationSpace space); 1027 const char* AllocationSpaceName(AllocationSpace space);
1025 1028
1026 } } // namespace v8::internal 1029 } } // namespace v8::internal
1027 1030
1028 #endif // V8_MARK_COMPACT_H_ 1031 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698