Expose a method to return the memory usage of all dynamic atoms. - #294
Conversation
Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Simon Sapin <simon@igalia.com>
727b6b2 to
949ce31
Compare
|
@jdm I’ve pushed a rewrite of this PR on top of recent changes, without using derive, and without using recursion to walk the linked list Could you check it with your Servo branch? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
It is currently impossible to test the changes because something about the upgrade to the 0.10 completely breaks page loading so the HTML content appears in the page: https://github.com/servo/servo/compare/main...jdm:servo:measure-dynamic?expand=1 Edit: aha, it's the phf update to 0.14 that messes everything up. When I revert that change, this appears to work with my changes to report it in about:memory. |
|
We do have this impl, does Servo not enable it? #[cfg(feature = "malloc_size_of")]
impl<Static: StaticAtomSet> malloc_size_of::MallocSizeOf for Atom<Static> {
fn size_of(&self, _ops: &mut malloc_size_of::MallocSizeOfOps) -> usize {
0
}
} |
Sounds good, thanks for testing! |
We need to perform a manual calculation because https://github.com/bholley/malloc_size_of_derive/ does not contain a MallocSizeOf implementation for
[...].