Closed Bug 1786506 Opened 3 years ago Closed 3 years ago

Make Zone GC state non-atomic by moving shared permanent things to their own zone

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(4 files)

Some GC things are permanent and shared between runtimes. They are allocated in the parent runtime's atoms zone and may be referred to by child runtimes. This means that any GC by child runtimes must be able to detect and ignore them.

One way this happens currently is by marking all these shared things black on initialisation and never collecting them. This helps cases where we check a GC thing's mark state. They are still part of the parent runtime's atoms zone though, and the state of this zone can change independently of child runtimes. This means that (at least) the zone state must be atomic to avoid races.

Instead of this, we can allocate these things into their own separate zone. This will not be collected until shutdown and so we won't get any races checking the state. The compiler can generate more efficient code for checking the state, and we can also merge most checks for shared things with existing zone state checks.

Attachment #9291121 - Attachment description: Bug 1786506 - Part 2: Give shared permanent things their one zone r?sfink → Bug 1786506 - Part 2: Give shared permanent things their own zone r?sfink
Depends on: 1786309
Blocks: 1785772
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/747154213937 Part 1: Add ZoneList prepend operation and use move semantics to indicate argument list is consumed r=sfink https://hg.mozilla.org/integration/autoland/rev/73928903648a Part 2: Give shared permanent things their own zone r=sfink https://hg.mozilla.org/integration/autoland/rev/1f7a816e0141 Part 3: Make Zone GC state non-atomic r=sfink https://hg.mozilla.org/integration/autoland/rev/dcf78df2531b Part 4: Remove checks for GC things owned by other runtimes where possible r=sfink

== Change summary for alert #35236 (as of Mon, 29 Aug 2022 23:17:57 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
7% dromaeo_dom linux1804-64-shippable-qr e10s fission stylo webrender 2,708.04 -> 2,904.33
7% dromaeo_dom linux1804-64-shippable-qr e10s fission stylo webrender 2,712.22 -> 2,890.48

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

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

Attachment

General

Created:
Updated:
Size: