Various memory measurement improvements (#36834)

The two significant changes here are 1) a commit that frees memory used
to perform memory reporting once the reporting is complete, 2) memory
reporting for the system font service. There are various other commits
that remove `#[ignore_malloc_size_of]` attributes for data that we are
now able to measure, but they do not significantly change our
measurements when testing servo.org.

Testing: Comparing the output of about:memory on servo.org.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-05-07 00:00:12 -04:00 committed by GitHub
parent e9f364ef51
commit ba8f923201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 135 additions and 49 deletions

View file

@ -14,6 +14,7 @@ use embedder_traits::{
use euclid::Rect;
use ipc_channel::ipc::IpcSender;
use log::warn;
use malloc_size_of_derive::MallocSizeOf;
use pixels::Image;
use strum_macros::IntoStaticStr;
use style_traits::CSSPixel;
@ -188,7 +189,7 @@ pub struct CompositionPipeline {
}
/// A mechanism to send messages from ScriptThread to the parent process' WebRender instance.
#[derive(Clone, Deserialize, Serialize)]
#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
pub struct CrossProcessCompositorApi(pub IpcSender<CompositorMsg>);
impl CrossProcessCompositorApi {