Closed Bug 1811368 Opened 2 years ago Closed 2 years ago

Improve builtin allocation perfomance of GC objects

Categories

(Core :: JavaScript: WebAssembly, task, P2)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

The struct/array allocation builtins are doing a lot of work that could be done just once at instantiation and then cached.

This used to be required by an old representation of PackedTypeCode, but
is no longer needed.

This commit creates an AllocArgs struct which stores the params that
GC object allocation will use. When we instantiate a module, we compute those
parameters for each type up front and store it in the instance data area. The
JIT then will pass a pointer to these parameters when allocating objects.

Depends on D167313

Objects with finalizers cannot use the nursery (except if they opt-in and use some more
complicated logic that we cannot use yet). This commit adds a new class for inline-only
structs that allows them to be allocated in the nursery.

Depends on D167314

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/8821bee4d401 wasm: Remove unneeded MaxTypeIndex. r=jseward https://hg.mozilla.org/integration/autoland/rev/3fc90d1119d6 wasm: Compute allocation parameters for types at instantiation. r=jseward https://hg.mozilla.org/integration/autoland/rev/5309cb65c435 wasm: Make structs with only inline data able to use the nursery. r=jseward https://hg.mozilla.org/integration/autoland/rev/dc5abbbf3907 1811368, 1811368: apply code formatting via Lando
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/0c7e1877c8f3 wasm: Remove unneeded MaxTypeIndex. r=jseward https://hg.mozilla.org/integration/autoland/rev/78dd59c068a9 wasm: Compute allocation parameters for types at instantiation. r=jseward https://hg.mozilla.org/integration/autoland/rev/58bdec1f2dec wasm: Make structs with only inline data able to use the nursery. r=jseward
Flags: needinfo?(rhunt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: