Summary: | DFGCodeBlocks should not trace CodeBlocks that are also going to be traced by virtue of being in the transitive closure | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ggaren | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Filip Pizlo
2012-03-01 22:10:24 PST
Created attachment 129815 [details]
the patch
Comment on attachment 129815 [details]
the patch
I just realized that this fix is inadequate. The reason why we were scanning the CodeBlocks even if they were not jettisoned is that they might become jettisoned later in the GC!
The correct fix is to have a separate mechanism for ensuring that a CodeBlock is only scanned once. I will work on this...
Created attachment 129825 [details]
the patch
Landed in http://trac.webkit.org/changeset/109519 I wonder if a better long-term approach would be something along the lines of our unconditional finalizers: anything that needs serial post-GC fixup would register an unconditional serial finalizer to do the fixup. (In reply to comment #6) > I wonder if a better long-term approach would be something along the lines of our unconditional finalizers: anything that needs serial post-GC fixup would register an unconditional serial finalizer to do the fixup. I'm not sure how that would work. The problem is that the outcome of the GC's trace is affected by what objects are marked, and CodeBlock::visitAggregate will mark objects. So if DFGCodeBlocks knows that a CodeBlock needs to do marking, then it should tell that CodeBlock to do marking. But that same CodeBlock may at any time during marking be found to be live because its ownerExecutable is live, in which case it will also end up doing marking. Because all of this is part of a fixpoint, I can't see an easy way to impose any sort of phasing. |