Closed Bug 1669669 Opened 5 years ago Closed 4 years ago

Arenas containing only permanent things don't need to be swept

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

Currently we allocate a lot of permanent atoms during startup (static strings and permanent atoms) and also JIT stubs. We always trace these at the start of a GC if we're collecting the atoms zone (in GCRuntime::traceRuntimeAtoms), therefore we don't need to sweep them since we know they will always survive.

It should be possible to move arenas containing only permanent things out of the main arena lists so that we can avoid sweeping them (until shutdown).

As a followup it should be possible to avoid tracing anything in these arenas too. Finally, it would be great if we could apply the same approach to the browser's permanent atoms.

(In reply to Jon Coppeard (:jonco) from comment #0)

As a followup it should be possible to avoid tracing anything in these arenas too.

We should be able to get to the stage where all permanent things shared between runtimes are always marked. Then we could remove some of the checks for permanent things in marking, since they would be subsumed by the 'is marked' check.

Assignee: nobody → jcoppeard

Currently there are only 4 JIT stubs in the atoms zone so it's not worth including them in this.

Depends on D121391

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b91ad7d1d7c0 Tidy GCRuntime to separate method and field definitions r=sfink https://hg.mozilla.org/integration/autoland/rev/d3e0ca7e2145 Don't mark or sweep permanent atoms r=sfink
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Regressions: 1723840
Regressions: 1723841
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: