Consider if, and if so how to best, report Glean SDK memory use in Firefox Desktop
Categories
(Data Platform and Tools :: Glean: SDK, task, P1)
Tracking
(firefox128 fixed)
| Tracking | Status | |
|---|---|---|
| firefox128 | --- | fixed |
People
(Reporter: chutten, Assigned: janerik)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
As mentioned in bug 1804420 comment 5, Glean SDK memory's ending up in the "heap unclassified" bucket. We ought to be able to do better than this and report where all the memory's going.
That is, if this makes sense to the SDK at large. Webrender apparently has a good model to follow, and there are empty crates.io impls for malloc_size_of/malloc_size_of_derive which ought to assist. But I've not looked into it.
Also: it may make the most sense for FOG to be the only part that records memory, but I'm not sure how much memory is used internal to the SDK vs at a layer where FOG would be able to report it. Unsure, so I'm filing this as an SDK bug first.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
This currently measures:
- Alloc size of all metrics
- Alloc size of additional maps used for metrics
- Alloc size of all pings
This requires a Glean update that implements all that malloc_size_of.
Downside:
The generated fog_metric_alloc_size is the 30th largest function in an
optimized build.
It's some 3000 lines long, because it has to call size_of on each and
every metric (majority of them use counters).
This will only grow with the number of metrics we add. I don't have a
solution for that yet.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Backed out for causing bc failures in nsCOMPtr.h
- Backout link
- Push with failures
- Failure Log
- Failure line: Assertion failure: query_result == mRawPtr (QueryInterface needed), at /builds/worker/checkouts/gecko/xpcom/base/nsCOMPtr.h:363
Comment 5•2 years ago
|
||
It looks like you need to add the new interface nsIMemoryReporter to the line NS_IMPL_ISUPPORTS(FOG, nsIFOG, nsIObserver).
Description
•