Refactor common infrastructure for creating memory reports. (#36579)

This removes a bunch of duplicated code needed to support
ConditionalMallocSizeOf correctly, and fixes multiple places where that
code was subtly wrong (the seen pointers hashset was never cleared).

Testing: Measuring https://www.nist.gov/image-gallery lots of times.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-04-17 22:14:49 -04:00 committed by GitHub
parent 2a81987590
commit 5e2d42e944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 68 additions and 57 deletions

View file

@ -22,6 +22,7 @@ log = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
serde = { workspace = true }
servo_allocator = { path = "../../allocator" }
servo_config = { path = "../../config" }
signpost = { git = "https://github.com/pcwalton/signpost.git" }
strum_macros = { workspace = true }