diff options
author | webbeef <me@webbeef.org> | 2025-04-04 22:42:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-05 05:42:12 +0000 |
commit | aef8537d7537cd886ce0a03e2c845b1c8dd54b6d (patch) | |
tree | 0ea7fe43631884bb7c3bfb4b06e0c1184fb8f3f2 /components/constellation/constellation.rs | |
parent | 76edcff20262543556f7b14ddbefdf6aaf0059ec (diff) | |
download | servo-aef8537d7537cd886ce0a03e2c845b1c8dd54b6d.tar.gz servo-aef8537d7537cd886ce0a03e2c845b1c8dd54b6d.zip |
Make the memory reporting multi-process aware (#35863)
So far the memory reporter aggregates reports from all processes, and
runs the system reporter only in the main process. Instead it is
desirable to have per-process reports. We do so by:
- creating a ProcessReports struct that holds includes the pid in
addition to the reports themselves.
- running the system memory reporter also in content processes.
- updating the about:memory page to create one report per process, and
add useful information like the pid and the urls loaded in a given
process.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Signed-off-by: webbeef <me@webbeef.org>
Diffstat (limited to 'components/constellation/constellation.rs')
-rw-r--r-- | components/constellation/constellation.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 69547e3f6a0..f176f3b60d0 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -712,7 +712,7 @@ where // namespace 0 for the embedder, and 0 for the constellation next_pipeline_namespace_id: PipelineNamespaceId(2), time_profiler_chan: state.time_profiler_chan, - mem_profiler_chan: state.mem_profiler_chan, + mem_profiler_chan: state.mem_profiler_chan.clone(), phantom: PhantomData, webdriver: WebDriverData::new(), document_states: HashMap::new(), @@ -739,7 +739,7 @@ where active_media_session: None, rippy_data, user_content_manager: state.user_content_manager, - process_manager: ProcessManager::new(), + process_manager: ProcessManager::new(state.mem_profiler_chan), }; constellation.run(); |