Closed Bug 1693483 Opened 4 years ago Closed 4 years ago

Move TypedObject TypeDescr from ObjectGroup to the object itself

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Keywords: perf-alert)

Attachments

(3 files)

The TypeDescr is currently stored in the ObjectGroup. The goal in this bug is to move the descriptor to the TypedObject itself. This will add a word to each TypedObject, but it will allows us to remove the group in bug 1689413.

So we're just changing the TypedObject header from {group, shape} => {group, shape, typeDescr} => {shape, typeDescr}.

When we had unboxed objects, not every object had a shape so derived classes had
to take care of tracing the shape. Now that every object has a shape again we can
simplify this.

The next patch will (temporarily) change this to OBJECT2.

Depends on D105606

To prepare for ObjectGroup removal, this adds the TypeDescr to the TypedObject
itself instead of storing it in the group.

The OutlineTypedObject AllocKind is changed from OBJECT0 to OBJECT2 to be able
to store the extra value. Once we remove the group from JSObject this will be
changed back, at that point the TypeDescr* replaces the group so there will be no
size increase.

Typed objects are currently only used for Wasm GC. Once they're more stable and
perf-sensitive, we can consider optimizing them better by potentially moving the
TypeDescr into the Shape etc. Short-term this patch makes it much easier for us
to change the object representation for all other objects.

Depends on D105607

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd1569ef4867
part 1 - Clean up object shape tracing. r=jonco
https://hg.mozilla.org/integration/autoland/rev/195044e074fa
part 2 - Use a constant for OutlineTypedObject AllocKind, assert its size is correct. r=jonco
https://hg.mozilla.org/integration/autoland/rev/bead43912b15
part 3 - Move TypeDescr from ObjectGroup to TypedObject. r=iain,rhunt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

== Change summary for alert #29056 (as of Thu, 04 Mar 2021 10:31:05 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
0.25% Base Content JS linux1804-64-shippable 2,514,934.15 -> 2,508,624.00
0.24% Base Content JS linux1804-64-shippable 2,514,509.00 -> 2,508,357.33

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=29056

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: