mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Plumb URL into interval profiler tracing events (#34337)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
fd3af6ad04
commit
3a32af0c85
4 changed files with 21 additions and 4 deletions
|
@ -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)+)
|
||||
}};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue