Open Bug 1591371 Opened 5 years ago Updated 2 years ago

Investigate collecting compartments in unscheduled zones that we notice are dead

Categories

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

enhancement

Tracking

()

People

(Reporter: jonco, Unassigned)

Details

Attachments

(1 obsolete file)

I'm not sure how much of an improvement this would be in practice, but it should be possible for the GC to notice that compartments are dead and collect them anyway, even if they are in zones that are not scheduled to be collected.

We already estimate liveness of compartments by noticing if they have any roots and then propagating that information via cross-compartment edges.

I wrote a patch for this but bug 1592598 ended up being a simpler fix for the problems I was seeing. This may still be worth doing at some time in the future.

Priority: P3 → P5
Assignee: jcoppeard → nobody

Move *Forwarded and related functions out of Marking-inl.h and into new Forwarding.h header file; Move SetMaybeAliveFlag functions into Marking-inl.h

This changes GCRuntime::findDeadCompartments() so that it does not assume that compartments in unscheduled zones are live. We also need to set the maybeAlive flag on compartments in unscheduled zones to discover if they have any roots. Then we can rerun the GC for any dead compartments, similar to how we do for compartments that have been revived during the GC.

If we had exact information about roots (we don't set maybeAlive for all GC thing kinds) we could possibly add zones containing these compartments to the GC at the beginning, but that would be more complicated since we've already done a bunch of stuff by the time we discover this.

Attachment #9123835 - Attachment is obsolete: true
Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: