mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Constellation can now optionally report memory usage when the page is loaded. (#37151)
The constellation can now tell the memory reporter to report the memory to a trace file when a page is loaded. Additionally, we amend the memory reporter to allow a simple message where it will report the memory to a tracing provider (at the moment only OHOS/hitrace is supported but easy extension is possible). I am not sure if this is the right approach or if the embedder should decide to have the memory reporting done. Testing: This does not change functionality of any of the rendering. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
5580704438
commit
13a980ff22
6 changed files with 32 additions and 1 deletions
|
@ -148,6 +148,7 @@ use net_traits::pub_domains::reg_host;
|
|||
use net_traits::request::Referrer;
|
||||
use net_traits::storage_thread::{StorageThreadMsg, StorageType};
|
||||
use net_traits::{self, IpcSend, ReferrerPolicy, ResourceThreads};
|
||||
use profile_traits::mem::ProfilerMsg;
|
||||
use profile_traits::{mem, time};
|
||||
use script_layout_interface::{LayoutFactory, ScriptThreadFactory};
|
||||
use script_traits::{
|
||||
|
@ -1488,6 +1489,9 @@ where
|
|||
) => {
|
||||
self.handle_evaluate_javascript(webview_id, evaluation_id, script);
|
||||
},
|
||||
EmbedderToConstellationMessage::CreateMemoryReport(sender) => {
|
||||
self.mem_profiler_chan.send(ProfilerMsg::Report(sender));
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue