We don't have memory reporting for custom element data

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P2
normal
RESOLVED FIXED
Last year
11 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

(Blocks 1 bug)

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

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: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1496673
You need to log in before you can comment on or make changes to this bug.