Re-enable code caching with new serialization system
Categories
(Core :: JavaScript: WebAssembly, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr91 | --- | unaffected |
| firefox100 | --- | wontfix |
| firefox101 | --- | wontfix |
| firefox102 | --- | fixed |
People
(Reporter: rhunt, Assigned: rhunt)
References
Details
(Keywords: sec-other, Whiteboard: [post-critsmash-triage][adv-main102-])
Attachments
(8 files)
|
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 | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Code caching was disabled in bug 1762619. We want to re-enable code caching with a new system for serialization.
| Assignee | ||
Comment 1•3 years ago
|
||
This commit removes all the old serialization code. The previous system
was also sort-of tied to about:memory reporting, and that's decoupled
now.
The API for Module::serialize/deserialize is also slightly reworked.
The previous ability to pass in a Metadata was needed for AsmJS (as
far as I can tell) and is not used. Additionally, the serialize
function will now resize the byte vector for you, and we no
longer expose serializedSize. Serialization is also decoupled from
submitting the bytes to the Tier2 listener.
| Assignee | ||
Comment 2•3 years ago
|
||
This commit adds a feature that forces all module compilation to be serialized
and then deserialized before it can be used. The flag forces off baseline/
cranelift so that we can serialize every module.
Test directives are updated to use the flag when appropriate.
The fuzzer is also changed to define a build-id so that it can use
this feature.
Depends on D143399
| Assignee | ||
Comment 3•3 years ago
|
||
This commit splits out the header fields of the stack map to
simplify serialization. The header is POD that can be serialized
separately from the trailing bitmap.
An interface for writing to a bitmap is added for deserialization.
An interface to finish collecting stackmaps without sorting is added.
The const qualification of nextInsAddr is modified.
Depends on D143400
| Assignee | ||
Comment 4•3 years ago
|
||
Many data types are copied directly to/from the serialized buffer. This
is only safe if the data is "cacheable POD". This commit adds type traits
and assertions for this that will be used with the new serialization code.
A doc comment is added with the full details.
Depends on D143401
| Assignee | ||
Comment 5•3 years ago
|
||
This commit re-implements the serialization code using a visitor
pattern that allows for most data structures to be serialized
with one function that can handle sizing/encoding/decoding.
A doc comment is added with the full details.
Depends on D143402
| Assignee | ||
Comment 6•3 years ago
|
||
I could not find a test for this, and it's relevant for serialization.
Depends on D143403
| Assignee | ||
Comment 7•3 years ago
|
||
This commit adds an assertion for tracking the size of types that
we serialize so that we can detect if they change without updating
the corresponding serialize function.
Comment 8•3 years ago
|
||
wasm: Remove old serialization system. r=yury
https://hg.mozilla.org/integration/autoland/rev/2f7ff945e99b7adc8852637244e3cf10dcddf123
https://hg.mozilla.org/mozilla-central/rev/2f7ff945e99b
wasm: Add --wasm-test-serialization flag. r=yury
https://hg.mozilla.org/integration/autoland/rev/516249a8f5c5cc1fc1c6c73b5ffa086eb4df21e5
https://hg.mozilla.org/mozilla-central/rev/516249a8f5c5
wasm: Split out stack map header to prepare for serialization. r=jseward
https://hg.mozilla.org/integration/autoland/rev/a1736cc48e510508e44e82b1ab8488c7e3ddff52
https://hg.mozilla.org/mozilla-central/rev/a1736cc48e51
wasm: Add "cacheable POD" type traits, and use them. r=yury
https://hg.mozilla.org/integration/autoland/rev/3c4f16bca961c2219dc3ee5dbd5ea4bf9d9f40ca
https://hg.mozilla.org/mozilla-central/rev/3c4f16bca961
wasm: Re-implement serialization. r=yury
https://hg.mozilla.org/integration/autoland/rev/1ebb605c8ea013d55337193fe641db416fdef27e
https://hg.mozilla.org/mozilla-central/rev/1ebb605c8ea0
wasm: Add test for using customSections() JS-API. r=yury
https://hg.mozilla.org/integration/autoland/rev/16eb969bfba2139c9d05ea4f7b9200874fab7bbc
https://hg.mozilla.org/mozilla-central/rev/16eb969bfba2
wasm: Add golden tests for sizeof serialized types. r=yury
https://hg.mozilla.org/integration/autoland/rev/37306021447094c8abebbf6ada9837ed4780a10f
https://hg.mozilla.org/mozilla-central/rev/373060214470
| Assignee | ||
Comment 9•3 years ago
|
||
I forgot we need to do the pref-flip too. Another patch incoming.
| Assignee | ||
Comment 10•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 11•3 years ago
|
||
wasm: Re-enable code caching. r=yury
https://hg.mozilla.org/integration/autoland/rev/9fa28fc6240ae5ec69385566d719acb179c3a839
https://hg.mozilla.org/mozilla-central/rev/9fa28fc6240a
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•