mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Plumb time profiler output into tracing (#34238)
* Plumb time profiler output into tracing Signed-off-by: Delan Azabani <dazabani@igalia.com> * Enter the span tightly around the callback Signed-off-by: Delan Azabani <dazabani@igalia.com> * Use `info_span!()` shorthand Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
495cceb7de
commit
aa7116c75d
16 changed files with 279 additions and 82 deletions
|
@ -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 }
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue