Closed Bug 372110 Opened 17 years ago Closed 17 years ago

Make cycle-collection debugging features optional at compile time

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha3

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file, 3 obsolete files)

I don't think we should ship the graph drawing code in released builds, in that case we also don't need the objname argument for DescribeNode.
Agreed.  I was actually thinking of filing this yesterday. :-)
Assignee: nobody → peterv
Summary: Make cycle-collection graph drawing feature optional at compile time → Make cycle-collection debugging features optional at compile time
Attached patch v1 (obsolete) — Splinter Review
Attached patch v1.1 (obsolete) — Splinter Review
Attachment #262163 - Attachment is obsolete: true
Attachment #262266 - Flags: review?(graydon)
Comment on attachment 262266 [details] [diff] [review]
v1.1

I'm a little nervous about the disabled check for null in Walk, since we'll crash rather than just go dead in that case. Ask whoever's super-reviewing to tie-break on that, I don't know what the right choice is to be "well-behaved". Otherwise looks good.
Attachment #262266 - Flags: review?(graydon) → review+
(In reply to comment #4)
> (From update of attachment 262266 [details] [diff] [review])
> I'm a little nervous about the disabled check for null in Walk, since we'll
> crash rather than just go dead in that case. Ask whoever's super-reviewing to
> tie-break on that, I don't know what the right choice is to be "well-behaved".

Well, my thinking was that because we make sure that the pointer is added to mGraph before pushing it in the queue (in NoteXPCOMChild/NoteScriptChild), we're sure that it is in mGraph and lookup shouldn't fail.
Attached patch v1.2 (obsolete) — Splinter Review
Actually, let's be safe and keep the null-check for now.
Attachment #262266 - Attachment is obsolete: true
Attachment #262289 - Flags: superreview?(jst)
Attachment #262289 - Flags: review+
Attachment #262289 - Flags: superreview?(jst) → superreview+
Attached patch v1.3Splinter Review
Turns out we need mScanDelay to force collection during shutdown, so I undid the changes to remove it and nsCycleCollectorParams, otherwise we'll leak more.
Attachment #262289 - Attachment is obsolete: true
Blocks: 377787
This seems to have lowered Collect times by about 5-10% in my DEBUG build.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: