Commit 1b2f3258 authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

[heap] Fix allocation site updating with MinorMC

Updates when moving a whole page were done only on new to new moves.
For MinorMC we need to update on new to old moves.

Bug: v8:12612
Change-Id: Icf7b98a005ec2f9ee3863ffa15ebe44fdfc64289
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824338Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82389}
parent 41cc7196
......@@ -1977,9 +1977,14 @@ class EvacuateNewSpacePageVisitor final : public HeapObjectVisitor {
inline bool Visit(HeapObject object, int size) override {
if (mode == NEW_TO_NEW) {
DCHECK(!FLAG_minor_mc);
heap_->UpdateAllocationSite(object.map(), object,
local_pretenuring_feedback_);
} else if (mode == NEW_TO_OLD) {
if (FLAG_minor_mc) {
heap_->UpdateAllocationSite(object.map(), object,
local_pretenuring_feedback_);
}
DCHECK_IMPLIES(V8_EXTERNAL_CODE_SPACE_BOOL, !IsCodeSpaceObject(object));
PtrComprCageBase cage_base = GetPtrComprCageBase(object);
object.IterateFast(cage_base, record_visitor_);
......
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