Commit 54a36366 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] No more old-to-new slot deletion during GC pause

Right trimming of arrays was deleting old-to-new slots during a GC pause.
Disable slots removal for right trimming of arrays and ensure no more slots
are deleted during a GC pause.

Bug: v8:9454
Change-Id: I6268d63b82713d765247dca4aaadadfe275b7dcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691915Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62604}
parent f8c2b210
......@@ -3120,7 +3120,7 @@ void Heap::CreateFillerForArray(T object, int elements_to_trim,
// We do not create a filler for objects in a large object space.
if (!IsLargeObject(object)) {
HeapObject filler =
CreateFillerObjectAt(new_end, bytes_to_trim, ClearRecordedSlots::kYes);
CreateFillerObjectAt(new_end, bytes_to_trim, ClearRecordedSlots::kNo);
DCHECK(!filler.is_null());
// Clear the mark bits of the black area that belongs now to the filler.
// This is an optimization. The sweeper will release black fillers anyway.
......
......@@ -104,16 +104,7 @@ void StoreBuffer::InsertDuringRuntime(StoreBuffer* store_buffer, Address slot) {
void StoreBuffer::DeleteDuringGarbageCollection(StoreBuffer* store_buffer,
Address start, Address end) {
// In GC the store buffer has to be empty at any time.
DCHECK(store_buffer->Empty());
DCHECK(store_buffer->mode() != StoreBuffer::NOT_IN_GC);
Page* page = Page::FromAddress(start);
if (end) {
RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end,
SlotSet::PREFREE_EMPTY_BUCKETS);
} else {
RememberedSet<OLD_TO_NEW>::Remove(page, start);
}
UNREACHABLE();
}
void StoreBuffer::InsertDuringGarbageCollection(StoreBuffer* store_buffer,
......
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