Open Bug 1027551 Opened 10 years ago Updated 2 years ago

Add memory reporting of refcounted MiscContainer objects

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: jwatt, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P2])

Bug 1026985 stopped us from twice-counting MiscContainer objects when they are refcounted and have a refcount of more than one. This means that when MiscContainer objects used to show up in the twice-reported section of DMD's reports, they will now show up in the unreported section. That's better than them showing up in the twice-reported section, but not ideal. Ideally we'd find a way to report these MiscContainers too.
A MiscContainer is 32 bytes on 64-bit OS X, so this is pretty low priority.
nsString is a similar case, and a more important one. The obvious thing to do is, for each ref, to divide the size by the refcount. Integration with DMD is the tricky bit, since DMD interprets calls to MallocSizeOf functions as being indicative of reporting, so if we measure N times and divide each time by N, DMD will think we've reported it N times.
Presumably the size of the stuff within the MiscContainer can be considerably larger than 32 bytes.
Good point, that is very true. Currently the only content is the style data from some 'style' attributes, I believe, but the value 'style' attributes can sometimes be quite long.
Whiteboard: [MemShrink] → [MemShrink:P2]
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.