Plumb selected tracing spans into hitrace (#33324)

* Plumb selected tracing spans into hitrace

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Tag the spans in #33189 with the `servo_profiling` field

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Add comment about fields vs extensions

Signed-off-by: Delan Azabani <dazabani@igalia.com>

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2024-09-10 17:03:55 +08:00 committed by GitHub
parent d4be678a69
commit 6d6cd0f2dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 162 additions and 11 deletions

View file

@ -1333,7 +1333,7 @@ where
}
}
#[tracing::instrument(skip(self))]
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
fn handle_request_from_compositor(&mut self, message: FromCompositorMsg) {
trace_msg_from_compositor!(message, "{message:?}");
match message {
@ -1546,7 +1546,11 @@ where
self.set_webview_throttled(webview_id, throttled);
},
FromCompositorMsg::ReadyToPresent(webview_ids) => {
let span = span!(Level::TRACE, "FromCompositorMsg::ReadyToPresent");
let span = span!(
Level::TRACE,
"FromCompositorMsg::ReadyToPresent",
servo_profiling = true
);
let _enter = span.enter();
self.embedder_proxy
.send((None, EmbedderMsg::ReadyToPresent(webview_ids)));