Commit 8c8e6b41 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[offthread] Serialize new-space objects into old space

If an object made it into serialization, it probably deserves to be in
old space when it is deserialized. This will also make off-thread
deserialization simpler, as there is no off-thread new space.

Bug: chromium:1075999
Change-Id: Icabf2f0ae0a3e0205a1094dd0ffe675e69bd1d8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2184291
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67606}
parent 8e7c6ec6
......@@ -569,11 +569,16 @@ SnapshotSpace GetSnapshotSpace(HeapObject object) {
// Large code objects are not supported and cannot be expressed by
// SnapshotSpace.
DCHECK_NE(heap_space, CODE_LO_SPACE);
// Young generation large objects are tenured.
if (heap_space == NEW_LO_SPACE) {
return SnapshotSpace::kLargeObject;
} else {
return static_cast<SnapshotSpace>(heap_space);
switch (heap_space) {
// Young generation objects are tenured, as objects that have survived
// until snapshot building probably deserve to be considered 'old'.
case NEW_SPACE:
return SnapshotSpace::kOld;
case NEW_LO_SPACE:
return SnapshotSpace::kLargeObject;
default:
return static_cast<SnapshotSpace>(heap_space);
}
}
}
......
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