mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Filter Perfetto traces to servo_profiling
spans and events only (#34209)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
b28260aa13
commit
f83e0a8b67
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ pub fn init_tracing() {
|
||||||
// Set up a PerfettoLayer for performance tracing.
|
// Set up a PerfettoLayer for performance tracing.
|
||||||
// The servo.pftrace file can be uploaded to https://ui.perfetto.dev for analysis.
|
// The servo.pftrace file can be uploaded to https://ui.perfetto.dev for analysis.
|
||||||
let file = std::fs::File::create("servo.pftrace").unwrap();
|
let file = std::fs::File::create("servo.pftrace").unwrap();
|
||||||
let perfetto_layer = tracing_perfetto::PerfettoLayer::new(std::sync::Mutex::new(file));
|
let perfetto_layer = tracing_perfetto::PerfettoLayer::new(std::sync::Mutex::new(file))
|
||||||
|
.with_filter_by_marker(|field_name| field_name == "servo_profiling");
|
||||||
subscriber.with(perfetto_layer)
|
subscriber.with(perfetto_layer)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue