Closed Bug 1486480 Opened 6 years ago Closed 6 years ago

We don't have memory reporting for custom element data

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Right now we don't memory-report any members of nsExtendedDOMSlots (see FragmentOrElement::nsDOMSlots::SizeOfIncludingThis).  That means we don't memory-report custom element data.

In DMD, I am seeing multiple megabytes of this allocated in the chrome process, because we allocate it for every single XUL element.
One thing which complicates memory reporting here is that nsExtendedDOMSlots can be allocated separately or as part of nsDOMSlots (in which case the whole thing is FatSlots).
XUL elements should use usually (always?) FatSlots.
I'm working on this right now, fwiw.
Assignee: nobody → bzbarsky
Comment on attachment 9004277 [details]
Bug 1486480.  Add memory reporting for custom element data.  r=smaug

Olli Pettay [:smaug] has approved the revision.
Attachment #9004277 - Flags: review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9dc25841ff4f
Add memory reporting for custom element data.  r=smaug
Bah.  OwnsExtendedSlots() returns true if there are no extended slots at all.  And this is the only consumer, and moz_malloc_size_of is null-safe.
Flags: needinfo?(bzbarsky)
Priority: -- → P2
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4292aeb328da
Add memory reporting for custom element data.  r=smaug
https://hg.mozilla.org/mozilla-central/rev/4292aeb328da
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1496673
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: