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_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_INCREMENTAL_MARKING_H_ |
6 #define V8_INCREMENTAL_MARKING_H_ | 6 #define V8_INCREMENTAL_MARKING_H_ |
7 | 7 |
8 | 8 |
9 #include "src/execution.h" | 9 #include "src/execution.h" |
10 #include "src/mark-compact.h" | 10 #include "src/mark-compact.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); | 129 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); |
130 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); | 130 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); |
131 void RecordCodeTargetPatch(Address pc, HeapObject* value); | 131 void RecordCodeTargetPatch(Address pc, HeapObject* value); |
132 | 132 |
133 inline void RecordWrites(HeapObject* obj); | 133 inline void RecordWrites(HeapObject* obj); |
134 | 134 |
135 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); | 135 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); |
136 | 136 |
137 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); | 137 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); |
138 | 138 |
| 139 inline int steps_count() { return steps_count_; } |
| 140 |
| 141 inline double steps_took() { return steps_took_; } |
| 142 |
| 143 inline double longest_step() { return longest_step_; } |
| 144 |
| 145 inline int steps_count_since_last_gc() { return steps_count_since_last_gc_; } |
| 146 |
| 147 inline double steps_took_since_last_gc() { return steps_took_since_last_gc_; } |
| 148 |
139 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { | 149 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { |
140 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); | 150 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); |
141 } | 151 } |
142 | 152 |
143 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { | 153 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { |
144 SetNewSpacePageFlags(chunk, IsMarking()); | 154 SetNewSpacePageFlags(chunk, IsMarking()); |
145 } | 155 } |
146 | 156 |
147 MarkingDeque* marking_deque() { return &marking_deque_; } | 157 MarkingDeque* marking_deque() { return &marking_deque_; } |
148 | 158 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 Heap* heap_; | 219 Heap* heap_; |
210 | 220 |
211 State state_; | 221 State state_; |
212 bool is_compacting_; | 222 bool is_compacting_; |
213 | 223 |
214 base::VirtualMemory* marking_deque_memory_; | 224 base::VirtualMemory* marking_deque_memory_; |
215 bool marking_deque_memory_committed_; | 225 bool marking_deque_memory_committed_; |
216 MarkingDeque marking_deque_; | 226 MarkingDeque marking_deque_; |
217 | 227 |
218 int steps_count_; | 228 int steps_count_; |
| 229 double steps_took_; |
| 230 double longest_step_; |
219 int64_t old_generation_space_available_at_start_of_incremental_; | 231 int64_t old_generation_space_available_at_start_of_incremental_; |
220 int64_t old_generation_space_used_at_start_of_incremental_; | 232 int64_t old_generation_space_used_at_start_of_incremental_; |
| 233 int steps_count_since_last_gc_; |
| 234 double steps_took_since_last_gc_; |
221 int64_t bytes_rescanned_; | 235 int64_t bytes_rescanned_; |
222 bool should_hurry_; | 236 bool should_hurry_; |
223 int marking_speed_; | 237 int marking_speed_; |
224 intptr_t bytes_scanned_; | 238 intptr_t bytes_scanned_; |
225 intptr_t allocated_; | 239 intptr_t allocated_; |
226 intptr_t write_barriers_invoked_since_last_step_; | 240 intptr_t write_barriers_invoked_since_last_step_; |
227 | 241 |
228 int no_marking_scope_depth_; | 242 int no_marking_scope_depth_; |
229 | 243 |
230 int unscanned_bytes_of_large_object_; | 244 int unscanned_bytes_of_large_object_; |
231 | 245 |
232 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 246 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
233 }; | 247 }; |
234 | 248 |
235 } } // namespace v8::internal | 249 } } // namespace v8::internal |
236 | 250 |
237 #endif // V8_INCREMENTAL_MARKING_H_ | 251 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |