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

Unified Diff: src/heap/heap.cc

Issue 2847953002: [heap] Cleanup: Untangle marking state and deque in incremental marking (Closed)
Patch Set: Remove unused parameter Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/incremental-marking.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8706113ae981bd25cd3302a94792143d30f4eed2..bfc913f20d27b4b10036eb770e048b4d3f9b2164 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3202,8 +3202,8 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
!Marking::IsBlack(ObjectMarking::MarkBitFrom(
HeapObject::FromAddress(new_start),
MarkingState::Internal(HeapObject::FromAddress(new_start))))) {
- IncrementalMarking::TransferMark(this, object,
- HeapObject::FromAddress(new_start));
+ incremental_marking()->TransferMark(this, object,
+ HeapObject::FromAddress(new_start));
}
// Technically in new space this write might be omitted (except for
@@ -4288,7 +4288,7 @@ void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) {
void Heap::NotifyObjectLayoutChange(HeapObject* object,
const DisallowHeapAllocation&) {
if (FLAG_incremental_marking && incremental_marking()->IsMarking()) {
- incremental_marking()->MarkGrey(this, object);
+ incremental_marking()->MarkGrey(object);
}
#ifdef VERIFY_HEAP
DCHECK(pending_layout_change_object_ == nullptr);
@@ -4855,7 +4855,7 @@ class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor {
// promoted objects.
if (heap_->incremental_marking()->black_allocation()) {
Code* code = Code::cast(Code::GetObjectFromEntryAddress(code_entry_slot));
- IncrementalMarking::MarkGrey(heap_, code);
+ heap_->incremental_marking()->MarkGrey(code);
}
}
@@ -4897,7 +4897,7 @@ void Heap::IterateAndScavengePromotedObject(HeapObject* target, int size,
// regular visiting and IteratePromotedObjectPointers.
if (!was_marked_black) {
if (incremental_marking()->black_allocation()) {
- IncrementalMarking::MarkGrey(this, target->map());
+ incremental_marking()->MarkGrey(target->map());
incremental_marking()->IterateBlackObject(target);
}
}
@@ -5517,7 +5517,6 @@ bool Heap::SetUp() {
store_buffer_ = new StoreBuffer(this);
incremental_marking_ = new IncrementalMarking(this);
-
concurrent_marking_ = new ConcurrentMarking(this);
for (int i = 0; i <= LAST_SPACE; i++) {
@@ -5565,6 +5564,8 @@ bool Heap::SetUp() {
tracer_ = new GCTracer(this);
scavenge_collector_ = new Scavenger(this);
mark_compact_collector_ = new MarkCompactCollector(this);
+ incremental_marking_->set_marking_deque(
+ mark_compact_collector_->marking_deque());
if (FLAG_minor_mc)
minor_mark_compact_collector_ = new MinorMarkCompactCollector(this);
gc_idle_time_handler_ = new GCIdleTimeHandler();
@@ -5676,7 +5677,7 @@ void Heap::RegisterExternallyReferencedObject(Object** object) {
HeapObject* heap_object = HeapObject::cast(*object);
DCHECK(Contains(heap_object));
if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) {
- IncrementalMarking::MarkGrey(this, heap_object);
+ incremental_marking()->MarkGrey(heap_object);
} else {
DCHECK(mark_compact_collector()->in_use());
mark_compact_collector()->MarkObject(heap_object);
« no previous file with comments | « no previous file | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698