| 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_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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 Heap* heap() const { return heap_; } | 218 Heap* heap() const { return heap_; } |
| 219 | 219 |
| 220 IncrementalMarkingJob* incremental_marking_job() { | 220 IncrementalMarkingJob* incremental_marking_job() { |
| 221 return &incremental_marking_job_; | 221 return &incremental_marking_job_; |
| 222 } | 222 } |
| 223 | 223 |
| 224 bool black_allocation() { return black_allocation_; } | 224 bool black_allocation() { return black_allocation_; } |
| 225 | 225 |
| 226 void StartBlackAllocationForTesting() { StartBlackAllocation(); } | 226 void StartBlackAllocationForTesting() { StartBlackAllocation(); } |
| 227 | 227 |
| 228 void AbortBlackAllocation(); |
| 229 |
| 228 private: | 230 private: |
| 229 class Observer : public AllocationObserver { | 231 class Observer : public AllocationObserver { |
| 230 public: | 232 public: |
| 231 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) | 233 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) |
| 232 : AllocationObserver(step_size), | 234 : AllocationObserver(step_size), |
| 233 incremental_marking_(incremental_marking) {} | 235 incremental_marking_(incremental_marking) {} |
| 234 | 236 |
| 235 void Step(int bytes_allocated, Address, size_t) override { | 237 void Step(int bytes_allocated, Address, size_t) override { |
| 236 incremental_marking_.NotifyAllocatedBytes(bytes_allocated); | 238 incremental_marking_.NotifyAllocatedBytes(bytes_allocated); |
| 237 } | 239 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 GCRequestType request_type_; | 315 GCRequestType request_type_; |
| 314 | 316 |
| 315 IncrementalMarkingJob incremental_marking_job_; | 317 IncrementalMarkingJob incremental_marking_job_; |
| 316 | 318 |
| 317 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 319 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 318 }; | 320 }; |
| 319 } // namespace internal | 321 } // namespace internal |
| 320 } // namespace v8 | 322 } // namespace v8 |
| 321 | 323 |
| 322 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 324 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |