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

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

Issue 1225733002: Reland concurrent sweeping of code space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/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 // 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // then the whole given space is swept. It returns the size of the maximum 684 // then the whole given space is swept. It returns the size of the maximum
685 // continuous freed memory chunk. 685 // continuous freed memory chunk.
686 int SweepInParallel(PagedSpace* space, int required_freed_bytes); 686 int SweepInParallel(PagedSpace* space, int required_freed_bytes);
687 687
688 // Sweeps a given page concurrently to the sweeper threads. It returns the 688 // Sweeps a given page concurrently to the sweeper threads. It returns the
689 // size of the maximum continuous freed memory chunk. 689 // size of the maximum continuous freed memory chunk.
690 int SweepInParallel(Page* page, PagedSpace* space); 690 int SweepInParallel(Page* page, PagedSpace* space);
691 691
692 void EnsureSweepingCompleted(); 692 void EnsureSweepingCompleted();
693 693
694 void EnsureSweepingCompleted(Page* page, PagedSpace* space);
695
694 // If sweeper threads are not active this method will return true. If 696 // If sweeper threads are not active this method will return true. If
695 // this is a latency issue we should be smarter here. Otherwise, it will 697 // this is a latency issue we should be smarter here. Otherwise, it will
696 // return true if the sweeper threads are done processing the pages. 698 // return true if the sweeper threads are done processing the pages.
697 bool IsSweepingCompleted(); 699 bool IsSweepingCompleted();
698 700
699 void RefillFreeList(PagedSpace* space); 701 void RefillFreeList(PagedSpace* space);
700 702
701 // Checks if sweeping is in progress right now on any space. 703 // Checks if sweeping is in progress right now on any space.
702 bool sweeping_in_progress() { return sweeping_in_progress_; } 704 bool sweeping_in_progress() { return sweeping_in_progress_; }
703 705
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 Heap* heap_; 962 Heap* heap_;
961 base::VirtualMemory* marking_deque_memory_; 963 base::VirtualMemory* marking_deque_memory_;
962 size_t marking_deque_memory_committed_; 964 size_t marking_deque_memory_committed_;
963 MarkingDeque marking_deque_; 965 MarkingDeque marking_deque_;
964 CodeFlusher* code_flusher_; 966 CodeFlusher* code_flusher_;
965 bool have_code_to_deoptimize_; 967 bool have_code_to_deoptimize_;
966 968
967 List<Page*> evacuation_candidates_; 969 List<Page*> evacuation_candidates_;
968 970
969 base::SmartPointer<FreeList> free_list_old_space_; 971 base::SmartPointer<FreeList> free_list_old_space_;
972 base::SmartPointer<FreeList> free_list_code_space_;
970 973
971 friend class Heap; 974 friend class Heap;
972 }; 975 };
973 976
974 977
975 class MarkBitCellIterator BASE_EMBEDDED { 978 class MarkBitCellIterator BASE_EMBEDDED {
976 public: 979 public:
977 explicit MarkBitCellIterator(MemoryChunk* chunk) : chunk_(chunk) { 980 explicit MarkBitCellIterator(MemoryChunk* chunk) : chunk_(chunk) {
978 last_cell_index_ = Bitmap::IndexToCell(Bitmap::CellAlignIndex( 981 last_cell_index_ = Bitmap::IndexToCell(Bitmap::CellAlignIndex(
979 chunk_->AddressToMarkbitIndex(chunk_->area_end()))); 982 chunk_->AddressToMarkbitIndex(chunk_->area_end())));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 private: 1028 private:
1026 MarkCompactCollector* collector_; 1029 MarkCompactCollector* collector_;
1027 }; 1030 };
1028 1031
1029 1032
1030 const char* AllocationSpaceName(AllocationSpace space); 1033 const char* AllocationSpaceName(AllocationSpace space);
1031 } 1034 }
1032 } // namespace v8::internal 1035 } // namespace v8::internal
1033 1036
1034 #endif // V8_HEAP_MARK_COMPACT_H_ 1037 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698