Open Bug 1539518 Opened 8 months ago Updated 6 months ago

Provide helpers to only show the still-allocated JS object allocations


(DevTools :: Framework, enhancement, P3)



(Not tracked)


(Reporter: ochameau, Assigned: ochameau)


(Depends on 1 open bug, Blocks 2 open bugs)


For now, we do have DEBUG_DEVTOOLS_ALLOCATION environment variable to help debug all the Javascript object allocations that happened during a mochitest or a DAMP test.
While it help understanding what particular code is creating many JS objects,
it doesn't help tracking memory leaks as it doesn't tell you which allocations are still alive or freed. It only tells you about where objects were allocated.

We could probably use memory.takeCensus in order to provide a view on the still-allocated objects, which would ignore all the allocations that have been freed.

Then, once we have this view, we can probably collect a metric, similar to modules metrics introduced in bug 1458194.
The view would help trying to figure out some leaks while the record would help prevent regressions.

Assignee: nobody → poirot.alex
Severity: normal → enhancement
Priority: -- → P3
Blocks: 1540693
Depends on: 1540694
Depends on: 1540761
Depends on: 1541819
You need to log in before you can comment on or make changes to this bug.