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:
parent
e2466bb5ff
commit
1547136c4e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user