Closed
Bug 639270
Opened 13 years ago
Closed 13 years ago
sweep compartments when they are empty, no longer mark them
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 3 obsolete files)
14.79 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
After landing bug 639254 compartments are completely passive (sweep-only), so we no longer have to mark them. This removes another branch from the mark path.
Assignee | ||
Updated•13 years ago
|
Assignee: general → gal
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #517231 -
Flags: review?
Assignee | ||
Updated•13 years ago
|
Attachment #517231 -
Flags: review? → review?(anygregor)
Comment 2•13 years ago
|
||
> After landing bug 639254 compartments are completely passive (sweep-only), ...
I.e., compartments are weak, or compartments contribute no strong refs (root set elements), right?
/be
Comment 3•13 years ago
|
||
We added the mark flag because a GC can happen during allocation of the first object. How do you prevent in that case that the compartment gets deleted?
Assignee | ||
Comment 4•13 years ago
|
||
Right. That was a hack though. We could do a pidgeon hole or a rooter. I will add something (feel free to steal any of the patches if you like).
Comment 5•13 years ago
|
||
How about changing the active flag to a state flag and let it store the current state of the compartment? We might find better names but currently I use constructing, up and active.
Assignee | ||
Comment 6•13 years ago
|
||
How about a rooter? We have infrastructure for that. Its only needed in NewGlobalWithCompartment. But yeah this would work too. The auto helper can set it.
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #517231 -
Attachment is obsolete: true
Attachment #517288 -
Attachment is obsolete: true
Attachment #517231 -
Flags: review?(anygregor)
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #517884 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #517885 -
Flags: review?(anygregor)
Comment 9•13 years ago
|
||
Comment on attachment 517885 [details] [diff] [review] patch Some overhead for this corner case but looks good.
Attachment #517885 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 10•13 years ago
|
||
Global objects are very very rarely allocated.
Assignee | ||
Comment 11•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/80d8431f209e
Whiteboard: fixed-in-tracemonkey
Comment 12•13 years ago
|
||
1.54 + *(holdp = &compartment->hold) = true; Nesting assignment gratuitously! Why not init holdp in the ctor head? Also don't auto-only helpers need stub copy ctors and dtors? /be
OS: Mac OS X → All
Comment 13•13 years ago
|
||
Backed out in http://hg.mozilla.org/tracemonkey/rev/38aba506e3c4 - nits or not, it doesn't actually compile.
Updated•13 years ago
|
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 14•13 years ago
|
||
Compiled here! I will fix, including the nit. Thanks Phil. I hope you make it to one of our summits one day so I can buy you one of those many beers I owe you by now.
Assignee | ||
Comment 15•13 years ago
|
||
Missing the missing renaming in xpconnect and the nits. http://hg.mozilla.org/tracemonkey/rev/206d6b6b392f
I'm pretty sure this is fixed, but please unset if I'm wrong.
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 17•13 years ago
|
||
Fixed yes, merged to m-c no, so we are keeping the bug open.
Comment 18•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/206d6b6b392f
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•