Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1805996 - Apply malloc_size_of to most types to gather heap-allocated memory #2794

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

badboy
Copy link
Member

@badboy badboy commented Apr 10, 2024

This is not yet complete.
It's applied for all metric types and part of the global Glean object. However it doesn't expose any method yet to get the information about the global Glean object.
Metrics are generated in user code anyway, so measuring their memory usage needs codegen.

This also doesn't measure some other memory usage:

  • Rkv
  • delayed ping data
  • event database
  • any queues to the dispatcher
  • maybe more?

This is a first attempt at integrating malloc_size_of to use that in a memory reporter inside m-c.
I have PoC code for m-c using this too.
There's some things I don't like yet and probably need to reach out to folks.
One of them being wr_malloc_size_of being different versions on crates.io and in-tree with differing implementations.

This is not yet complete.
It's applied for all metric types and part of the global Glean object.
However it doesn't expose any method yet to get the information about
the global Glean object.
Metrics are generated in user code anyway, so measuring their memory
usage needs codegen.

This also doesn't measure some other memory usage:

* Rkv
* delayed ping data
* event database
* any queues to the dispatcher
* maybe more?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant