Closed Bug 1837563 Opened 2 years ago Closed 1 year ago

Initial implementation of inline allocation of WasmStructObjects that have no OOL storage

Categories

(Core :: JavaScript: WebAssembly, enhancement, P1)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1861261

People

(Reporter: jseward, Assigned: jseward)

References

Details

Attachments

(2 files, 7 obsolete files)

This bug is intended to build on bug 1833614, which simplifies the
struct-allocation paths. In particular the aim is to produce a first
attempt at an inline version of Instance::structNewInitIL,
Instance::structNewUninitIL and WasmStructObject::createStructIL.

This is a precursor patch. It separates out into a new C++ function, the
code I am thinking to inline; then uses that as a fast path and falls back
to the existing allocation functions if that doesn't work out. This facilitates
experimenting/tuning/investigating possible fast-paths before going to
the trouble of actually inlining them.

Even if we never bother with the inlining itself, this patch -- when applied
on top of those of bug 1833614 -- gives, for Barista-3 -O3, a 5.2% reduction
in first-frame time, and a 6.0% reduction in frame-average time, for Ion.
So even as it stands (after cleaning up!) it would be a worthwhile improvement.

Cleaned up and commented version of the previous patch.

Attachment #9338226 - Attachment is obsolete: true

Now with a check for realm()->hasAllocationMetadataBuilder() and
minor further cleanups.

Attachment #9338235 - Attachment is obsolete: true

Now with additional low-level implementation (near-machine-level) C++,
suitable as a starting point for code generation. Also with testing on
x86_64-linux, x86-linux and arm64-linux.

Attachment #9338518 - Attachment is obsolete: true

Now with correct handling of GC zeal mode bits.
No actual inline code yet though.

Attachment #9338851 - Attachment is obsolete: true

Revision 11 of the patch.

Attachment #9339010 - Attachment is obsolete: true

Precursor hot-path-in-C++ patch, revision 12.

Attachment #9339406 - Attachment is obsolete: true

First version of a patch that actually generates the hot path inline.
Very far from being landable.

Somewhat improved inline code generation, plus it works for both
x86_64-linux and i686-linux. Is worth around 1%-2% on Barista-3 -O3,
that is to say, not much, considering that the C++ precursor patches
bring a 5+% improvement without any inline code generation.

Attachment #9339617 - Attachment is obsolete: true
Severity: -- → N/A
Priority: -- → P1

This was fixed in bug 1861261.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1861261
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: