diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/Cargo.toml | 4 | ||||
-rw-r--r-- | components/layout/parallel.rs | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 797aac24cfa..cf7617790f8 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -13,6 +13,9 @@ path = "lib.rs" test = true doctest = false +[features] +tracing = ["dep:tracing"] + [dependencies] app_units = { workspace = true } atomic_refcell = { workspace = true } @@ -47,6 +50,7 @@ servo_url = { path = "../url" } smallvec = { workspace = true, features = ["union"] } style = { workspace = true } style_traits = { workspace = true } +tracing = { workspace = true, optional = true } unicode-bidi = { workspace = true, features = ["with_serde"] } unicode-script = { workspace = true } webrender_api = { workspace = true } diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 26d7d429a25..4b3f5c694c5 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -11,7 +11,8 @@ use std::sync::atomic::{AtomicIsize, Ordering}; use std::{mem, ptr}; -use profile_traits::time::{self, profile, TimerMetadata}; +use profile_traits::time::{self, TimerMetadata}; +use profile_traits::time_profile; use servo_config::opts; use smallvec::SmallVec; @@ -229,7 +230,7 @@ pub fn reflow( queue.install(move || { rayon::scope_fifo(move |scope| { - profile( + time_profile!( time::ProfilerCategory::LayoutParallelWarmup, profiler_metadata, time_profiler_chan, |