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

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

Issue 2337943002: [heap] Abort black allocation when aborting incremental marking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [heap] Abort black allocation when aborting incremental marking. Created 4 years, 3 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 | « no previous file | src/heap/incremental-marking.cc » ('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_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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698