Add tracing events (#33189)

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
atbrakhi 2024-09-05 14:11:12 +02:00 committed by GitHub
parent 37e1c3385e
commit 0f24b8c823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 0 deletions

View file

@ -48,6 +48,7 @@ webgpu = { path = "../webgpu" }
webrender = { workspace = true }
webrender_api = { workspace = true }
webrender_traits = { workspace = true }
tracing = { workspace = true }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
[target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies]

View file

@ -152,6 +152,7 @@ use servo_config::{opts, pref};
use servo_rand::{random, Rng, ServoRng, SliceRandom};
use servo_url::{Host, ImmutableOrigin, ServoUrl};
use style_traits::CSSPixel;
use tracing::{span, Level};
use webgpu::{self, WebGPU, WebGPURequest, WebGPUResponse};
use webrender::{RenderApi, RenderApiSender};
use webrender_api::DocumentId;
@ -1331,6 +1332,7 @@ where
}
}
#[tracing::instrument(skip(self))]
fn handle_request_from_compositor(&mut self, message: FromCompositorMsg) {
trace_msg_from_compositor!(message, "{message:?}");
match message {
@ -1543,6 +1545,8 @@ where
self.set_webview_throttled(webview_id, throttled);
},
FromCompositorMsg::ReadyToPresent(webview_ids) => {
let span = span!(Level::TRACE, "FromCompositorMsg::ReadyToPresent");
let _enter = span.enter();
self.embedder_proxy
.send((None, EmbedderMsg::ReadyToPresent(webview_ids)));
},