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() { | |
140 return steps_count_; | |
141 } | |
142 | |
143 inline double steps_took() { | |
144 return steps_took_; | |
145 } | |
146 | |
147 inline double longest_step() { | |
148 return longest_step_; | |
149 } | |
150 | |
151 inline int steps_count_since_last_gc() { | |
152 return steps_count_since_last_gc_; | |
153 } | |
154 | |
155 inline double steps_took_since_last_gc() { | |
156 return steps_took_since_last_gc_; | |
157 } | |
158 | |
159 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { | 139 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { |
160 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); | 140 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); |
161 } | 141 } |
162 | 142 |
163 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { | 143 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { |
164 SetNewSpacePageFlags(chunk, IsMarking()); | 144 SetNewSpacePageFlags(chunk, IsMarking()); |
165 } | 145 } |
166 | 146 |
167 MarkingDeque* marking_deque() { return &marking_deque_; } | 147 MarkingDeque* marking_deque() { return &marking_deque_; } |
168 | 148 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 208 |
229 Heap* heap_; | 209 Heap* heap_; |
230 | 210 |
231 State state_; | 211 State state_; |
232 bool is_compacting_; | 212 bool is_compacting_; |
233 | 213 |
234 base::VirtualMemory* marking_deque_memory_; | 214 base::VirtualMemory* marking_deque_memory_; |
235 bool marking_deque_memory_committed_; | 215 bool marking_deque_memory_committed_; |
236 MarkingDeque marking_deque_; | 216 MarkingDeque marking_deque_; |
237 | 217 |
238 int steps_count_; | |
239 double steps_took_; | |
240 double longest_step_; | |
241 int64_t old_generation_space_available_at_start_of_incremental_; | 218 int64_t old_generation_space_available_at_start_of_incremental_; |
242 int64_t old_generation_space_used_at_start_of_incremental_; | 219 int64_t old_generation_space_used_at_start_of_incremental_; |
243 int steps_count_since_last_gc_; | |
244 double steps_took_since_last_gc_; | |
245 int64_t bytes_rescanned_; | 220 int64_t bytes_rescanned_; |
246 bool should_hurry_; | 221 bool should_hurry_; |
247 int marking_speed_; | 222 int marking_speed_; |
248 intptr_t bytes_scanned_; | 223 intptr_t bytes_scanned_; |
249 intptr_t allocated_; | 224 intptr_t allocated_; |
250 intptr_t write_barriers_invoked_since_last_step_; | 225 intptr_t write_barriers_invoked_since_last_step_; |
251 | 226 |
252 int no_marking_scope_depth_; | 227 int no_marking_scope_depth_; |
253 | 228 |
254 int unscanned_bytes_of_large_object_; | 229 int unscanned_bytes_of_large_object_; |
255 | 230 |
256 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 231 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
257 }; | 232 }; |
258 | 233 |
259 } } // namespace v8::internal | 234 } } // namespace v8::internal |
260 | 235 |
261 #endif // V8_INCREMENTAL_MARKING_H_ | 236 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |