Allow movement of Wasm{Struct,Array}Object OOL blocks during GC
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox148 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
Details
Attachments
(1 file)
Bug 1995106 introduced suitable plumbing that allows stackmap entries for OOL
storage of Wasm{Struct,Array}Objects to flow through to the GC, but it does not
make use of them. This patch completes the job, by giving the GC the
opportunity of moving those blocks, recording their new locations in the
Nursery's forwarded-block table, and later using those entries to fix up
on-stack pointers to such blocks.
There is no change to the layout of either WasmStructObject or WasmArrayObject.
| Assignee | ||
Comment 1•7 months ago
|
||
Bug 1995106 introduced suitable plumbing that allows stackmap entries for OOL
storage of Wasm{Struct,Array}Objects to flow through to the GC, but it does not
make use of them. This patch completes the job, by giving the GC the
opportunity of moving those blocks, recording their new locations in the
Nursery's forwarded-block table, and later using those entries to fix up
on-stack pointers to such blocks.
There is no change to the layout of either WasmStructObject or WasmArrayObject.
Changes:
-
WasmArrayObject::obj_moved, WasmStructObject::obj_moved: completely
rewritten. More assertions, and more clarity about the {Nursery,Tenured} ->
{Nursery,Tenured} transitions. Allows the GC to move OOL blocks if required,
and if so adds their new addresses to the Nursery's forwarded-block table. -
Instance::updateFrameForMovingGC: completely rewritten. Use the
forwarded-block table to update OOL pointers as required. -
A bit of tidying of routines associated with WasmArrayObject::DataHeader.
Creates DataHeader::dataHeaderToDataPointer and makes that be more obviously
the "inverse" to ::dataHeaderFromDataPointer.
| Assignee | ||
Comment 2•7 months ago
|
||
Perf effects, for this patch applied together with that of bug 1995106.
Intel Tiger lake, best of 10 runs.
million million
instructions:u cycles:u Total Score
before after before after before after
j2cl-box2d 11,901 11,753 4,878 4,755 155.80 159.18
Ko-compose 117,468 116,798 76,378 76,044 4.17 4.20
Df-todomvc 29,526 29,600 22,334 22,426 25.31 25.18
Df-complex 102,098 102,065 68,466 68,564 4.57 4.56
Updated•6 months ago
|
Description
•