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
|
@ -26,6 +26,7 @@ use euclid::Vector2D;
|
|||
pub use from_script_message::*;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use profile_traits::mem::MemoryReportResult;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
pub use structured_data::*;
|
||||
|
@ -95,6 +96,8 @@ pub enum EmbedderToConstellationMessage {
|
|||
/// Evaluate a JavaScript string in the context of a `WebView`. When execution is complete or an
|
||||
/// error is encountered, a correpsonding message will be sent to the embedding layer.
|
||||
EvaluateJavaScript(WebViewId, JavaScriptEvaluationId, String),
|
||||
/// Create a memory report and return it via the ipc sender
|
||||
CreateMemoryReport(IpcSender<MemoryReportResult>),
|
||||
}
|
||||
|
||||
/// A description of a paint metric that is sent from the Servo renderer to the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue