[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: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67606}
This commit is contained in:
parent
8e7c6ec606
commit
8c8e6b4117
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user