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

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

Issue 2810893002: [heap] Implement simple concurrent marking deque. (Closed)
Patch Set: Fix comment Created 3 years, 7 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/incremental-marking.cc ('k') | src/heap/sequential-marking-deque.h » ('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 <deque> 8 #include <deque>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
11 #include "src/base/platform/condition-variable.h" 11 #include "src/base/platform/condition-variable.h"
12 #include "src/cancelable-task.h" 12 #include "src/cancelable-task.h"
13 #include "src/heap/concurrent-marking-deque.h"
13 #include "src/heap/marking.h" 14 #include "src/heap/marking.h"
14 #include "src/heap/sequential-marking-deque.h" 15 #include "src/heap/sequential-marking-deque.h"
15 #include "src/heap/spaces.h" 16 #include "src/heap/spaces.h"
16 #include "src/heap/store-buffer.h" 17 #include "src/heap/store-buffer.h"
17 18
18 namespace v8 { 19 namespace v8 {
19 namespace internal { 20 namespace internal {
20 21
21 // Forward declarations. 22 // Forward declarations.
22 class CodeFlusher; 23 class CodeFlusher;
23 class EvacuationJobTraits; 24 class EvacuationJobTraits;
24 class HeapObjectVisitor; 25 class HeapObjectVisitor;
25 class MarkCompactCollector; 26 class MarkCompactCollector;
26 class MinorMarkCompactCollector; 27 class MinorMarkCompactCollector;
27 class MarkingVisitor; 28 class MarkingVisitor;
28 class MigrationObserver; 29 class MigrationObserver;
29 template <typename JobTraits> 30 template <typename JobTraits>
30 class PageParallelJob; 31 class PageParallelJob;
31 class RecordMigratedSlotVisitor; 32 class RecordMigratedSlotVisitor;
32 class ThreadLocalTop; 33 class ThreadLocalTop;
33 34
35 #ifdef V8_CONCURRENT_MARKING
36 using MarkingDeque = ConcurrentMarkingDeque;
37 #else
34 using MarkingDeque = SequentialMarkingDeque; 38 using MarkingDeque = SequentialMarkingDeque;
39 #endif
35 40
36 class ObjectMarking : public AllStatic { 41 class ObjectMarking : public AllStatic {
37 public: 42 public:
38 V8_INLINE static MarkBit MarkBitFrom(HeapObject* obj, 43 V8_INLINE static MarkBit MarkBitFrom(HeapObject* obj,
39 const MarkingState& state) { 44 const MarkingState& state) {
40 const Address address = obj->address(); 45 const Address address = obj->address();
41 const MemoryChunk* p = MemoryChunk::FromAddress(address); 46 const MemoryChunk* p = MemoryChunk::FromAddress(address);
42 return state.bitmap()->MarkBitFromIndex(p->AddressToMarkbitIndex(address)); 47 return state.bitmap()->MarkBitFromIndex(p->AddressToMarkbitIndex(address));
43 } 48 }
44 49
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 ~EvacuationScope() { collector_->set_evacuation(false); } 735 ~EvacuationScope() { collector_->set_evacuation(false); }
731 736
732 private: 737 private:
733 MarkCompactCollector* collector_; 738 MarkCompactCollector* collector_;
734 }; 739 };
735 740
736 } // namespace internal 741 } // namespace internal
737 } // namespace v8 742 } // namespace v8
738 743
739 #endif // V8_HEAP_MARK_COMPACT_H_ 744 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/sequential-marking-deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698