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

Side by Side Diff: src/heap/incremental-marking.h

Issue 1420423009: [heap] Black allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
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_INCREMENTAL_MARKING_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_H_
7 7
8 #include "src/cancelable-task.h" 8 #include "src/cancelable-task.h"
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void LeaveNoMarkingScope() { no_marking_scope_depth_--; } 203 void LeaveNoMarkingScope() { no_marking_scope_depth_--; }
204 204
205 void NotifyIncompleteScanOfObject(int unscanned_bytes) { 205 void NotifyIncompleteScanOfObject(int unscanned_bytes) {
206 unscanned_bytes_of_large_object_ = unscanned_bytes; 206 unscanned_bytes_of_large_object_ = unscanned_bytes;
207 } 207 }
208 208
209 void ClearIdleMarkingDelayCounter(); 209 void ClearIdleMarkingDelayCounter();
210 210
211 bool IsIdleMarkingDelayCounterLimitReached(); 211 bool IsIdleMarkingDelayCounterLimitReached();
212 212
213 INLINE(static void MarkObject(Heap* heap, HeapObject* object)); 213 static void MarkObject(Heap* heap, HeapObject* object);
214
215 void IterateBlackCode(Code* code);
214 216
215 Heap* heap() const { return heap_; } 217 Heap* heap() const { return heap_; }
216 218
217 IncrementalMarkingJob* incremental_marking_job() { 219 IncrementalMarkingJob* incremental_marking_job() {
218 return &incremental_marking_job_; 220 return &incremental_marking_job_;
219 } 221 }
220 222
223 bool black_allocation() { return black_allocation_; }
224
221 private: 225 private:
222 class Observer : public InlineAllocationObserver { 226 class Observer : public InlineAllocationObserver {
223 public: 227 public:
224 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) 228 Observer(IncrementalMarking& incremental_marking, intptr_t step_size)
225 : InlineAllocationObserver(step_size), 229 : InlineAllocationObserver(step_size),
226 incremental_marking_(incremental_marking) {} 230 incremental_marking_(incremental_marking) {}
227 231
228 void Step(int bytes_allocated, Address, size_t) override { 232 void Step(int bytes_allocated, Address, size_t) override {
229 incremental_marking_.Step(bytes_allocated, 233 incremental_marking_.Step(bytes_allocated,
230 IncrementalMarking::GC_VIA_STACK_GUARD); 234 IncrementalMarking::GC_VIA_STACK_GUARD);
231 } 235 }
232 236
233 private: 237 private:
234 IncrementalMarking& incremental_marking_; 238 IncrementalMarking& incremental_marking_;
235 }; 239 };
236 240
237 int64_t SpaceLeftInOldSpace(); 241 int64_t SpaceLeftInOldSpace();
238 242
239 void SpeedUp(); 243 void SpeedUp();
240 244
241 void ResetStepCounters(); 245 void ResetStepCounters();
242 246
243 void StartMarking(); 247 void StartMarking();
244 248
249 void StartBlackAllocation();
250 void FinishBlackAllocation();
251
245 void MarkRoots(); 252 void MarkRoots();
246 void MarkObjectGroups(); 253 void MarkObjectGroups();
247 void ProcessWeakCells(); 254 void ProcessWeakCells();
248 // Retain dying maps for <FLAG_retain_maps_for_n_gc> garbage collections to 255 // Retain dying maps for <FLAG_retain_maps_for_n_gc> garbage collections to
249 // increase chances of reusing of map transition tree in future. 256 // increase chances of reusing of map transition tree in future.
250 void RetainMaps(); 257 void RetainMaps();
251 258
252 void ActivateIncrementalWriteBarrier(PagedSpace* space); 259 void ActivateIncrementalWriteBarrier(PagedSpace* space);
253 static void ActivateIncrementalWriteBarrier(NewSpace* space); 260 static void ActivateIncrementalWriteBarrier(NewSpace* space);
254 void ActivateIncrementalWriteBarrier(); 261 void ActivateIncrementalWriteBarrier();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 intptr_t allocated_; 294 intptr_t allocated_;
288 intptr_t write_barriers_invoked_since_last_step_; 295 intptr_t write_barriers_invoked_since_last_step_;
289 size_t idle_marking_delay_counter_; 296 size_t idle_marking_delay_counter_;
290 297
291 int no_marking_scope_depth_; 298 int no_marking_scope_depth_;
292 299
293 int unscanned_bytes_of_large_object_; 300 int unscanned_bytes_of_large_object_;
294 301
295 bool was_activated_; 302 bool was_activated_;
296 303
304 bool black_allocation_;
305
297 bool finalize_marking_completed_; 306 bool finalize_marking_completed_;
298 307
299 int incremental_marking_finalization_rounds_; 308 int incremental_marking_finalization_rounds_;
300 309
301 GCRequestType request_type_; 310 GCRequestType request_type_;
302 311
303 IncrementalMarkingJob incremental_marking_job_; 312 IncrementalMarkingJob incremental_marking_job_;
304 313
305 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 314 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
306 }; 315 };
307 } // namespace internal 316 } // namespace internal
308 } // namespace v8 317 } // namespace v8
309 318
310 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ 319 #endif // V8_HEAP_INCREMENTAL_MARKING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698