Set all tracing spans to trace level for now (#34256)

* Clean up tracing instrumentation

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

* Set all tracing spans to trace level for now

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

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2024-11-19 10:53:43 +08:00 committed by GitHub
parent 9a98852806
commit caf2467649
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 158 additions and 164 deletions

View file

@ -665,7 +665,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
/// instance in the parent process.
#[cfg_attr(
feature = "tracing",
tracing::instrument(skip_all, fields(servo_profiling = true))
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_cross_process_message(&mut self, msg: CrossProcessCompositorMessage) {
match msg {
@ -753,13 +753,11 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
);
#[cfg(feature = "tracing")]
let span = tracing::span!(
tracing::Level::TRACE,
let _span = tracing::trace_span!(
"ScriptToCompositorMsg::BuiltDisplayList",
servo_profiling = true
);
#[cfg(feature = "tracing")]
let _enter = span.enter();
servo_profiling = true,
)
.entered();
let pipeline_id = display_list_info.pipeline_id;
let details = self.pipeline_details(pipeline_id.into());
details.most_recent_display_list_epoch = Some(display_list_info.epoch);
@ -2029,7 +2027,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
/// GPU and returned as Ok(Some(png::Image)), otherwise we return Ok(None).
#[cfg_attr(
feature = "tracing",
tracing::instrument(skip_all, fields(servo_profiling = true))
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn composite_specific_target(
&mut self,
@ -2244,13 +2242,9 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
};
#[cfg(feature = "tracing")]
let span = tracing::span!(
tracing::Level::TRACE,
"ConstellationMsg::ReadyToPresent",
servo_profiling = true
);
#[cfg(feature = "tracing")]
let _enter = span.enter();
let _span =
tracing::trace_span!("ConstellationMsg::ReadyToPresent", servo_profiling = true)
.entered();
// Notify embedder that servo is ready to present.
// Embedder should call `present` to tell compositor to continue rendering.
self.waiting_on_present = true;
@ -2277,17 +2271,12 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
tracing::instrument(skip_all, fields(servo_profiling = true))
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn present(&mut self) {
#[cfg(feature = "tracing")]
let span = tracing::span!(
tracing::Level::TRACE,
"Compositor Present Surface",
servo_profiling = true
);
#[cfg(feature = "tracing")]
let _enter = span.enter();
let _span =
tracing::trace_span!("Compositor Present Surface", servo_profiling = true).entered();
if let Err(err) = self.rendering_context.present() {
warn!("Failed to present surface: {:?}", err);
}
@ -2351,7 +2340,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
tracing::instrument(skip_all, fields(servo_profiling = true))
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn receive_messages(&mut self) -> bool {
// Check for new messages coming from the other threads in the system.
@ -2381,7 +2370,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
tracing::instrument(skip_all, fields(servo_profiling = true))
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn perform_updates(&mut self) -> bool {
if self.shutdown_state == ShutdownState::FinishedShuttingDown {