[heap] De-duplicate insertions to the old-to-new remembered set.
Bug: v8:6663 Change-Id: I8bf7169c21141a34e3bcb0bb2193ceb1746b33b2 Reviewed-on: https://chromium-review.googlesource.com/600908 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#47186}
This commit is contained in:
parent
cfb019f528
commit
35f9b26601
@ -103,11 +103,13 @@ void StoreBuffer::MoveEntriesToRememberedSet(int index) {
|
|||||||
if (!lazy_top_[index]) return;
|
if (!lazy_top_[index]) return;
|
||||||
DCHECK_GE(index, 0);
|
DCHECK_GE(index, 0);
|
||||||
DCHECK_LT(index, kStoreBuffers);
|
DCHECK_LT(index, kStoreBuffers);
|
||||||
|
Address last_inserted_addr = nullptr;
|
||||||
for (Address* current = start_[index]; current < lazy_top_[index];
|
for (Address* current = start_[index]; current < lazy_top_[index];
|
||||||
current++) {
|
current++) {
|
||||||
Address addr = *current;
|
Address addr = *current;
|
||||||
Page* page = Page::FromAnyPointerAddress(heap_, addr);
|
Page* page = Page::FromAnyPointerAddress(heap_, addr);
|
||||||
if (IsDeletionAddress(addr)) {
|
if (IsDeletionAddress(addr)) {
|
||||||
|
last_inserted_addr = nullptr;
|
||||||
current++;
|
current++;
|
||||||
Address end = *current;
|
Address end = *current;
|
||||||
DCHECK(!IsDeletionAddress(end));
|
DCHECK(!IsDeletionAddress(end));
|
||||||
@ -120,7 +122,10 @@ void StoreBuffer::MoveEntriesToRememberedSet(int index) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DCHECK(!IsDeletionAddress(addr));
|
DCHECK(!IsDeletionAddress(addr));
|
||||||
RememberedSet<OLD_TO_NEW>::Insert(page, addr);
|
if (addr != last_inserted_addr) {
|
||||||
|
RememberedSet<OLD_TO_NEW>::Insert(page, addr);
|
||||||
|
last_inserted_addr = addr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lazy_top_[index] = nullptr;
|
lazy_top_[index] = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user