Closed Bug 839471 Opened 9 years ago Closed 8 years ago

GC: Sweep type objects on the background thread

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

Following on from sweeping shapes and baseshapes on the background thread, we can do the same for type objects.

One issue however is that TypeCompartment::markSetsUnknown() iterates over all type objects in the compartment.  Previously this was disallowed for thing kinds that were background finalized, as the other thread may be updating the heap data structures at the same time.

I've changed this so that for background finalized kinds CellIter waits for the background thread to finish sweeping if it is currently doing so.  No GC slice can occur while we are iterating, and this is asserted in debug builds, so I think this is safe.

This is a potential source of pauses, however I don't think it gets called that often in practice.
Attached patch Proposed fixSplinter Review
Try build here - looking good so far:

https://tbpl.mozilla.org/?tree=Try&rev=cbabf5b94168
Attachment #711810 - Flags: review?(wmccloskey)
Attachment #711810 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/16ddbb6852ec
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.