Faster allocation of small GC arrays
Categories
(Core :: JavaScript: WebAssembly, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: bvisness, Assigned: bvisness)
References
Details
Attachments
(7 files, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
We currently malloc storage for all GC arrays and use instance calls for all allocations. We can speed this up using techniques like we now use for structs - some amount of inline data storage on WasmArrayObject, and a JIT allocation path for small nursery allocations.
Updated•6 months ago
|
Assignee | ||
Comment 1•5 months ago
|
||
On arm64, breakpoints occur before the instruction pointer moves to the next instruction. Stepping from this point just triggers the breakpoint again. However, if a breakpoint occurs with code 0xf000, lldb will manually advance past the breakpoint so stepping works as expected.
Assignee | ||
Comment 2•5 months ago
|
||
This only implements the internal storage and does not allocate arrays via JIT.
Depends on D196633
Assignee | ||
Comment 3•5 months ago
|
||
Depends on D196634
Assignee | ||
Comment 4•5 months ago
|
||
Depends on D196635
Assignee | ||
Comment 5•5 months ago
|
||
Depends on D196636
Assignee | ||
Comment 6•5 months ago
|
||
Depends on D196637
Assignee | ||
Comment 7•5 months ago
|
||
We currently do the rather strange process of building stack map info
in a vector, then creating a StackMap, then copying the information over.
This is particularly strange now that we store multiple kinds of entries
in our stack maps. We always know the size of the stack map anyway, so
this patch removes the vectors and builds the information in the stack
map directly.
However, the vector did serve the helpful purpose of avoiding memory
allocation in the common case of a small StackMap with no refs, which
does not need to be stored. StackMap has therefore been updated with new
APIs to help avoid memory allocation until actually necessary.
Depends on D196638
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Assignee | ||
Comment 9•4 months ago
|
||
Zero-length arrays are disallowed by the C++ spec. The TrailingArray mixin
is a UB-free way of achieving the same data layout.
Comment 10•3 months ago
|
||
Pushed by bvisness@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a06e0e423e3d Use better breakpoint code for arm64. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/e11d865508b4 Convert wasm struct objects to use TrailingArray. r=jonco https://hg.mozilla.org/integration/autoland/rev/536bba21f186 Implement inline data storage in gc arrays. r=rhunt,jonco https://hg.mozilla.org/integration/autoland/rev/0ed7433a0a3b JIT allocation of gc arrays via Ion. r=rhunt,jonco https://hg.mozilla.org/integration/autoland/rev/57c4fd85b686 JIT allocation of gc arrays via baseline. r=rhunt https://hg.mozilla.org/integration/autoland/rev/63ad7de808ca Read and write array elements using proper scaled indexes. r=rhunt,jseward https://hg.mozilla.org/integration/autoland/rev/fcafc196f2ce Remove wasm::StackMapBoolVector. r=rhunt
Comment 11•3 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a06e0e423e3d
https://hg.mozilla.org/mozilla-central/rev/e11d865508b4
https://hg.mozilla.org/mozilla-central/rev/536bba21f186
https://hg.mozilla.org/mozilla-central/rev/0ed7433a0a3b
https://hg.mozilla.org/mozilla-central/rev/57c4fd85b686
https://hg.mozilla.org/mozilla-central/rev/63ad7de808ca
https://hg.mozilla.org/mozilla-central/rev/fcafc196f2ce
Description
•