Implement partial nursery collections (semispace-ish)
Categories
(Core :: JavaScript: GC, enhancement, P2)
Tracking
()
People
(Reporter: sfink, Assigned: sfink)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(10 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
The goal is to reduce unnecessary tenuring, when we tenure short-lived but recent allocations because we hit the end of the nursery. These appear to be fairly frequent in the matrix-react benchmark, for example.
Assignee | ||
Comment 1•2 years ago
|
||
Current design: allocate a large contiguous region of virtual memory space, roughly double the desired size of the nursery. Use the second half as the nursery space initially. When collecting, leave some portion in the nursery (call it K bytes). Back up the start of the nursery-allocatable region by K and run the mutator again to fill it up. Collect all but the K most recently allocated bytes, including the K-sized chunk left over from the previous iteration. Keep backing up the nursery start until hitting the beginning of the virtual memory area, then jump back to using the second half and repeat. In pictures, using 1/3 the size of the initial nursery-allocatable space as K:
[______] initial empty nursery
[___XXX] allocate into 2nd half
[_____X] collect all but last 1/3 of allocated space
[__XXXX] allocate into region just before preserved space
[____X_] collect all but most recent K sized chunk
[_XXXX_] allocate
[___X__] collect
[XXXX__] allocate
[__X___] collect
[__XXXX] now allocating into 2nd half again
[_____X] repeat
There are many details, but that's the basic idea.
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
Assignee | ||
Comment 7•2 years ago
|
||
Assignee | ||
Comment 8•2 years ago
|
||
Assignee | ||
Comment 9•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
Assignee | ||
Comment 11•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•