Call RecordWriteIntoCode in RelocInfo::set_target_cell.

This currently works since we never call set_target_cell when we have to record slots for evacuation. It would break with black allocation.

BUG=chromium:561449
LOG=n

Review URL: https://codereview.chromium.org/1643573003

Cr-Commit-Position: refs/heads/master@{#33575}
This commit is contained in:
hpayer 2016-01-28 01:14:19 -08:00 committed by Commit bot
parent e2466bb5ff
commit 1547136c4e
8 changed files with 15 additions and 29 deletions

View File

@ -197,10 +197,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -128,8 +128,7 @@ void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj,
Object* value) {
if (BaseRecordWrite(obj, value)) {
// Object is not going to be rescanned. We need to record the slot.
heap_->mark_compact_collector()->RecordRelocSlot(rinfo,
Code::cast(value));
heap_->mark_compact_collector()->RecordRelocSlot(rinfo, value);
}
}

View File

@ -203,10 +203,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Assembler::FlushICache(isolate_, pc_, sizeof(Address));
}
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -284,10 +284,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -282,10 +282,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -248,9 +248,8 @@ void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode write_barrier_mode,
Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -456,10 +456,8 @@ void RelocInfo::set_target_cell(Cell* cell,
}
if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}

View File

@ -204,10 +204,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Assembler::FlushICache(isolate_, pc_, sizeof(Address));
}
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on
// evacuation candidate.
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
cell);
}
}