Commit fa5304d1 authored by ulan's avatar ulan Committed by Commit bot

[heap] Unconditionally mark objects that undergo unsafe layout changes.

In the upcoming concurrent marking protocol the main thread will have to
mark objects before performing unsafe layout change.

This patch is an experiment for evaluating memory the impact of marking
an object on layout change.

BUG=chromium:694255

Review-Url: https://codereview.chromium.org/2706213002
Cr-Commit-Position: refs/heads/master@{#43351}
parent caa1d4b2
......@@ -4304,7 +4304,9 @@ void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) {
void Heap::NotifyObjectLayoutChange(HeapObject* object,
const DisallowHeapAllocation&) {
// TODO(ulan): Add synchronization with the concurrent marker.
if (FLAG_incremental_marking && incremental_marking()->IsMarking()) {
incremental_marking()->MarkGrey(this, object);
}
#ifdef VERIFY_HEAP
DCHECK(pending_layout_change_object_ == nullptr);
pending_layout_change_object_ = object;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment