aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/profile/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/shared/profile/lib.rs')
-rw-r--r--components/shared/profile/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/shared/profile/lib.rs b/components/shared/profile/lib.rs
index fef2b255bea..4e3aa1fc35d 100644
--- a/components/shared/profile/lib.rs
+++ b/components/shared/profile/lib.rs
@@ -18,10 +18,15 @@ pub mod time;
#[macro_export]
macro_rules! time_profile {
($category:expr, $meta:expr, $profiler_chan:expr, $($callback:tt)+) => {{
+ let meta: Option<$crate::time::TimerMetadata> = $meta;
#[cfg(feature = "tracing")]
- let span = tracing::info_span!($category.variant_name(), servo_profiling = true);
+ let span = tracing::info_span!(
+ $category.variant_name(),
+ servo_profiling = true,
+ url = meta.as_ref().map(|m| m.url.clone()),
+ );
#[cfg(not(feature = "tracing"))]
let span = ();
- $crate::time::profile($category, $meta, $profiler_chan, span, $($callback)+)
+ $crate::time::profile($category, meta, $profiler_chan, span, $($callback)+)
}};
}