aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorDelan Azabani <dazabani@igalia.com>2024-11-19 10:53:43 +0800
committerGitHub <noreply@github.com>2024-11-19 02:53:43 +0000
commitcaf2467649336abefe1deb71c669fa6f13fc8086 (patch)
treed21c1c5dd4ad75eb8a5ac54b3da59de6a8f21959 /components
parent9a98852806272779be0b9562c7f90a57e4f7b80d (diff)
downloadservo-caf2467649336abefe1deb71c669fa6f13fc8086.tar.gz
servo-caf2467649336abefe1deb71c669fa6f13fc8086.zip
Set all tracing spans to trace level for now (#34256)
* Clean up tracing instrumentation Signed-off-by: Delan Azabani <dazabani@igalia.com> * Set all tracing spans to trace level for now Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
Diffstat (limited to 'components')
-rw-r--r--components/compositing/compositor.rs39
-rw-r--r--components/constellation/constellation.rs190
-rw-r--r--components/fonts/font_context.rs2
-rw-r--r--components/fonts/system_font_service.rs21
-rw-r--r--components/layout_2020/display_list/clip_path.rs3
-rw-r--r--components/layout_2020/display_list/mod.rs4
-rw-r--r--components/layout_2020/display_list/stacking_context.rs3
-rw-r--r--components/layout_2020/flexbox/layout.rs9
-rw-r--r--components/layout_2020/table/layout.rs10
-rw-r--r--components/layout_thread_2020/lib.rs35
-rw-r--r--components/servo/lib.rs6
11 files changed, 158 insertions, 164 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index 0a6d764c722..9214d3abd09 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -665,7 +665,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
/// instance in the parent process.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_cross_process_message(&mut self, msg: CrossProcessCompositorMessage) {
match msg {
@@ -753,13 +753,11 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
);
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
+ let _span = tracing::trace_span!(
"ScriptToCompositorMsg::BuiltDisplayList",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ servo_profiling = true,
+ )
+ .entered();
let pipeline_id = display_list_info.pipeline_id;
let details = self.pipeline_details(pipeline_id.into());
details.most_recent_display_list_epoch = Some(display_list_info.epoch);
@@ -2029,7 +2027,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
/// GPU and returned as Ok(Some(png::Image)), otherwise we return Ok(None).
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn composite_specific_target(
&mut self,
@@ -2244,13 +2242,9 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
};
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
- "ConstellationMsg::ReadyToPresent",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ let _span =
+ tracing::trace_span!("ConstellationMsg::ReadyToPresent", servo_profiling = true)
+ .entered();
// Notify embedder that servo is ready to present.
// Embedder should call `present` to tell compositor to continue rendering.
self.waiting_on_present = true;
@@ -2277,17 +2271,12 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn present(&mut self) {
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
- "Compositor Present Surface",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ let _span =
+ tracing::trace_span!("Compositor Present Surface", servo_profiling = true).entered();
if let Err(err) = self.rendering_context.present() {
warn!("Failed to present surface: {:?}", err);
}
@@ -2351,7 +2340,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn receive_messages(&mut self) -> bool {
// Check for new messages coming from the other threads in the system.
@@ -2381,7 +2370,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
pub fn perform_updates(&mut self) -> bool {
if self.shutdown_state == ShutdownState::FinishedShuttingDown {
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index b915828b497..2ded8ee5925 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -612,7 +612,11 @@ where
#[allow(clippy::too_many_arguments)]
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip(state, layout_factory), fields(servo_profiling = true))
+ tracing::instrument(
+ skip(state, layout_factory),
+ fields(servo_profiling = true),
+ level = "trace",
+ )
)]
pub fn start(
state: InitialConstellationState,
@@ -1159,7 +1163,7 @@ where
/// Handles loading pages, navigation, and granting access to the compositor
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request(&mut self) {
#[derive(Debug)]
@@ -1259,7 +1263,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_for_pipeline_namespace(&mut self, request: PipelineNamespaceRequest) {
let PipelineNamespaceRequest(sender) = request;
@@ -1268,7 +1272,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_from_background_hang_monitor(&self, message: HangMonitorAlert) {
match message {
@@ -1285,7 +1289,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_from_network_listener(&mut self, message: (PipelineId, FetchResponseMsg)) {
let (id, message_) = message;
@@ -1314,7 +1318,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_from_compositor(&mut self, message: FromCompositorMsg) {
trace_msg_from_compositor!(message, "{message:?}");
@@ -1532,13 +1536,11 @@ where
},
FromCompositorMsg::ReadyToPresent(webview_ids) => {
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
+ let _span = tracing::trace_span!(
"FromCompositorMsg::ReadyToPresent",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ servo_profiling = true,
+ )
+ .entered();
self.embedder_proxy
.send((None, EmbedderMsg::ReadyToPresent(webview_ids)));
},
@@ -1550,7 +1552,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_from_script(&mut self, message: (PipelineId, FromScriptMsg)) {
let (source_pipeline_id, content) = message;
@@ -1871,7 +1873,7 @@ where
/// Broadcast a message via routers in various event-loops.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_schedule_broadcast(
&self,
@@ -1918,7 +1920,7 @@ where
/// Remove a channel-name for a given broadcast router.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_remove_broadcast_channel_name_in_router(
&mut self,
@@ -1957,7 +1959,7 @@ where
/// Note a new channel-name relevant to a given broadcast router.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_new_broadcast_channel_name_in_router(
&mut self,
@@ -1982,7 +1984,7 @@ where
/// Remove a broadcast router.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_remove_broadcast_channel_router(
&mut self,
@@ -2004,7 +2006,7 @@ where
/// Add a new broadcast router.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_new_broadcast_channel_router(
&mut self,
@@ -2030,7 +2032,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_wgpu_request(
&mut self,
@@ -2111,7 +2113,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_request_from_layout(&mut self, message: FromLayoutMsg) {
trace_layout_msg!(message, "{message:?}");
@@ -2129,7 +2131,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_message_port_transfer_completed(
&mut self,
@@ -2271,7 +2273,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_complete_message_port_transfer(
&mut self,
@@ -2355,7 +2357,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_reroute_messageport(&mut self, port_id: MessagePortId, task: PortMessageTask) {
let info = match self.message_ports.get_mut(&port_id) {
@@ -2390,7 +2392,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_messageport_shipped(&mut self, port_id: MessagePortId) {
if let Some(info) = self.message_ports.get_mut(&port_id) {
@@ -2448,7 +2450,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_remove_messageport(&mut self, port_id: MessagePortId) {
let entangled = match self.message_ports.remove(&port_id) {
@@ -2499,7 +2501,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_entangle_messageports(&mut self, port1: MessagePortId, port2: MessagePortId) {
if let Some(info) = self.message_ports.get_mut(&port1) {
@@ -2528,7 +2530,7 @@ where
/// which are scoped per origin.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_schedule_serviceworker_job(&mut self, pipeline_id: PipelineId, job: Job) {
let origin = job.scope_url.origin();
@@ -2571,7 +2573,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_broadcast_storage_event(
&self,
@@ -2605,7 +2607,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_exit(&mut self) {
debug!("Handling exit.");
@@ -2689,7 +2691,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_shutdown(&mut self) {
debug!("Handling shutdown.");
@@ -2817,7 +2819,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_send_error(&mut self, pipeline_id: PipelineId, err: IpcError) {
// Treat send error the same as receiving a panic message
@@ -2832,7 +2834,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_panic(
&mut self,
@@ -2933,7 +2935,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_log_entry(
&mut self,
@@ -3016,7 +3018,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_new_top_level_browsing_context(
&mut self,
@@ -3086,7 +3088,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_close_top_level_browsing_context(
&mut self,
@@ -3136,7 +3138,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_iframe_size_msg(&mut self, iframe_sizes: Vec<IFrameSizeMsg>) {
for IFrameSizeMsg {
@@ -3156,7 +3158,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_subframe_loaded(&mut self, pipeline_id: PipelineId) {
let browsing_context_id = match self.pipelines.get(&pipeline_id) {
@@ -3200,7 +3202,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_navigate_request(
&self,
@@ -3224,7 +3226,7 @@ where
// the result of a page navigation.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_script_loaded_url_in_iframe_msg(&mut self, load_info: IFrameLoadInfoWithData) {
let IFrameLoadInfo {
@@ -3334,7 +3336,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_script_new_iframe(&mut self, load_info: IFrameLoadInfoWithData) {
let IFrameLoadInfo {
@@ -3398,7 +3400,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_script_new_auxiliary(&mut self, load_info: AuxiliaryBrowsingContextLoadInfo) {
let AuxiliaryBrowsingContextLoadInfo {
@@ -3487,7 +3489,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_pending_paint_metric(&self, pipeline_id: PipelineId, epoch: Epoch) {
self.compositor_proxy
@@ -3496,7 +3498,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_set_cursor_msg(&mut self, cursor: Cursor) {
self.embedder_proxy
@@ -3505,7 +3507,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_change_running_animations_state(
&mut self,
@@ -3526,7 +3528,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_tick_animation(&mut self, pipeline_id: PipelineId, tick_type: AnimationTickType) {
let pipeline = match self.pipelines.get(&pipeline_id) {
@@ -3545,7 +3547,7 @@ where
/// 2: Store the details of the navigation, pending approval from the embedder.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn schedule_navigation(
&mut self,
@@ -3575,7 +3577,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn load_url(
&mut self,
@@ -3707,7 +3709,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_abort_load_url_msg(&mut self, new_pipeline_id: PipelineId) {
let pending_index = self
@@ -3728,7 +3730,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_load_complete_msg(
&mut self,
@@ -3780,7 +3782,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_navigated_to_fragment(
&mut self,
@@ -3815,7 +3817,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_traverse_history_msg(
&mut self,
@@ -3960,7 +3962,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn update_browsing_context(
&mut self,
@@ -4088,7 +4090,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn update_pipeline(
&mut self,
@@ -4118,7 +4120,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_joint_session_history_length(
&self,
@@ -4135,7 +4137,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_push_history_state_msg(
&mut self,
@@ -4178,7 +4180,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_replace_history_state_msg(
&mut self,
@@ -4206,7 +4208,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_ime_dismissed(&mut self) {
// Send to the focused browsing contexts' current pipeline.
@@ -4240,7 +4242,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_ime_msg(&mut self, event: CompositionEvent) {
// Send to the focused browsing contexts' current pipeline.
@@ -4318,7 +4320,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_reload_msg(&mut self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
@@ -4340,7 +4342,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_post_message_msg(
&mut self,
@@ -4382,7 +4384,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_get_pipeline(
&mut self,
@@ -4407,7 +4409,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_get_browsing_context(
&mut self,
@@ -4425,7 +4427,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_focus_msg(&mut self, pipeline_id: PipelineId) {
let (browsing_context_id, top_level_browsing_context_id) =
@@ -4463,7 +4465,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn focus_parent_pipeline(&mut self, browsing_context_id: BrowsingContextId) {
let parent_pipeline_id = match self.browsing_contexts.get(&browsing_context_id) {
@@ -4497,7 +4499,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_remove_iframe_msg(
&mut self,
@@ -4513,7 +4515,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_set_throttled_complete(&mut self, pipeline_id: PipelineId, throttled: bool) {
let browsing_context_id = match self.pipelines.get(&pipeline_id) {
@@ -4551,7 +4553,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_create_canvas_paint_thread_msg(
&mut self,
@@ -4578,7 +4580,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg) {
// Find the script channel for the given parent pipeline,
@@ -4712,7 +4714,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn set_webview_throttled(&mut self, webview_id: WebViewId, throttled: bool) {
let browsing_context_id = BrowsingContextId::from(webview_id);
@@ -4730,7 +4732,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn notify_history_changed(&self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
// Send a flat projection of the history to embedder.
@@ -4847,7 +4849,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn load_url_for_webdriver(
&mut self,
@@ -4878,7 +4880,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn change_session_history(&mut self, change: SessionHistoryChange) {
debug!(
@@ -5036,7 +5038,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn focused_browsing_context_is_descendant_of(
&self,
@@ -5055,7 +5057,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn trim_history(&mut self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
let pipelines_to_evict = {
@@ -5118,7 +5120,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_activate_document_msg(&mut self, pipeline_id: PipelineId) {
debug!("{}: Document ready to activate", pipeline_id);
@@ -5167,7 +5169,7 @@ where
/// Called when the window is resized.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_window_size_msg(
&mut self,
@@ -5193,7 +5195,7 @@ where
/// Called when the window exits from fullscreen mode
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_exit_fullscreen_msg(
&mut self,
@@ -5210,7 +5212,7 @@ where
/// Since this function is only used in reftests, we do not harden it against panic.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_is_ready_to_save_image(
&mut self,
@@ -5297,7 +5299,7 @@ where
/// Get the current activity of a pipeline.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn get_activity(&self, pipeline_id: PipelineId) -> DocumentActivity {
let mut ancestor_id = pipeline_id;
@@ -5327,7 +5329,7 @@ where
/// Set the current activity of a pipeline.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn set_activity(&self, pipeline_id: PipelineId, activity: DocumentActivity) {
debug!("{}: Setting activity to {:?}", pipeline_id, activity);
@@ -5349,7 +5351,7 @@ where
/// Update the current activity of a pipeline.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn update_activity(&self, pipeline_id: PipelineId) {
self.set_activity(pipeline_id, self.get_activity(pipeline_id));
@@ -5359,7 +5361,7 @@ where
/// This notifies every pipeline in the context of the new size.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn resize_browsing_context(
&mut self,
@@ -5419,7 +5421,7 @@ where
// Handle switching from fullscreen mode
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn switch_fullscreen_mode(&mut self, browsing_context_id: BrowsingContextId) {
if let Some(browsing_context) = self.browsing_contexts.get(&browsing_context_id) {
@@ -5442,7 +5444,7 @@ where
// Close and return the browsing context with the given id (and its children), if it exists.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn close_browsing_context(
&mut self,
@@ -5485,7 +5487,7 @@ where
// Close the children of a browsing context
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn close_browsing_context_children(
&mut self,
@@ -5519,7 +5521,7 @@ where
// Discard the pipeline for a given document, udpdate the joint session history.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_discard_document(
&mut self,
@@ -5554,7 +5556,7 @@ where
// Send a message to script requesting the document associated with this pipeline runs the 'unload' algorithm.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn unload_document(&self, pipeline_id: PipelineId) {
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
@@ -5566,7 +5568,7 @@ where
// Close all pipelines at and beneath a given browsing context
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn close_pipeline(
&mut self,
@@ -5633,7 +5635,7 @@ where
// Randomly close a pipeline -if --random-pipeline-closure-probability is set
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn maybe_close_random_pipeline(&mut self) {
match self.random_pipeline_closure {
@@ -5674,7 +5676,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn get_joint_session_history(
&mut self,
@@ -5689,7 +5691,7 @@ where
// Convert a browsing context to a sendable form to pass to the compositor
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn browsing_context_to_sendable(
&self,
@@ -5722,7 +5724,7 @@ where
/// Send the frame tree for the given webview to the compositor.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn update_webview_in_compositor(&mut self, webview_id: WebViewId) {
// Note that this function can panic, due to ipc-channel creation failure.
@@ -5738,7 +5740,7 @@ where
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_media_session_action_msg(&mut self, action: MediaSessionActionType) {
if let Some(media_session_pipeline_id) = self.active_media_session {
@@ -5768,7 +5770,7 @@ where
/// Handle GamepadEvents from the embedder and forward them to the script thread
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_gamepad_msg(&mut self, event: GamepadEvent) {
// Send to the focused browsing contexts' current pipeline.
diff --git a/components/fonts/font_context.rs b/components/fonts/font_context.rs
index 4105d8fa81d..bba34146945 100644
--- a/components/fonts/font_context.rs
+++ b/components/fonts/font_context.rs
@@ -280,7 +280,7 @@ impl FontContext {
/// cache thread and a `FontDescriptor` which contains the styling parameters.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn create_font(
&self,
diff --git a/components/fonts/system_font_service.rs b/components/fonts/system_font_service.rs
index 69b03c6eecc..69244d12410 100644
--- a/components/fonts/system_font_service.rs
+++ b/components/fonts/system_font_service.rs
@@ -147,20 +147,15 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn run(&mut self) {
loop {
let msg = self.port.recv().unwrap();
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
- "SystemFontServiceMessage",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ let _span =
+ tracing::trace_span!("SystemFontServiceMessage", servo_profiling = true).entered();
match msg {
SystemFontServiceMessage::GetFontTemplates(
font_descriptor,
@@ -192,7 +187,7 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn fetch_new_keys(&mut self) {
if !self.free_font_keys.is_empty() && !self.free_font_instance_keys.is_empty() {
@@ -212,7 +207,7 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn get_font_templates(
&mut self,
@@ -228,7 +223,7 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn refresh_local_families(&mut self) {
self.local_families.clear();
@@ -242,7 +237,7 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn find_font_templates(
&mut self,
@@ -269,7 +264,7 @@ impl SystemFontService {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn get_font_instance(
&mut self,
diff --git a/components/layout_2020/display_list/clip_path.rs b/components/layout_2020/display_list/clip_path.rs
index 0a0b40bc7fd..819b98e83b7 100644
--- a/components/layout_2020/display_list/clip_path.rs
+++ b/components/layout_2020/display_list/clip_path.rs
@@ -70,7 +70,8 @@ pub(super) fn build_clip_path_clip_chain_if_necessary(
tracing::instrument(
name = "display_list::build_simple_shape",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
fn build_simple_shape(
diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs
index 34c54a10848..a18df1687b4 100644
--- a/components/layout_2020/display_list/mod.rs
+++ b/components/layout_2020/display_list/mod.rs
@@ -182,9 +182,7 @@ impl DisplayList {
root_stacking_context: &StackingContext,
) -> (FnvHashMap<BrowsingContextId, Size2D<f32, CSSPixel>>, bool) {
#[cfg(feature = "tracing")]
- let span = tracing::span!(tracing::Level::TRACE, "display_list::build");
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ let _span = tracing::trace_span!("display_list::build", servo_profiling = true).entered();
let mut builder = DisplayListBuilder {
current_scroll_node_id: self.compositor_info.root_reference_frame_id,
current_reference_frame_scroll_node_id: self.compositor_info.root_reference_frame_id,
diff --git a/components/layout_2020/display_list/stacking_context.rs b/components/layout_2020/display_list/stacking_context.rs
index 8ba4794b0d9..e76ab0f9716 100644
--- a/components/layout_2020/display_list/stacking_context.rs
+++ b/components/layout_2020/display_list/stacking_context.rs
@@ -106,7 +106,8 @@ impl DisplayList {
tracing::instrument(
name = "display_list::build_stacking_context_tree",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
pub fn build_stacking_context_tree(
diff --git a/components/layout_2020/flexbox/layout.rs b/components/layout_2020/flexbox/layout.rs
index 11bfedb3255..1a35ecd39c0 100644
--- a/components/layout_2020/flexbox/layout.rs
+++ b/components/layout_2020/flexbox/layout.rs
@@ -395,7 +395,8 @@ impl FlexContainer {
tracing::instrument(
name = "FlexContainer::inline_content_sizes",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
pub fn inline_content_sizes(
@@ -607,7 +608,8 @@ impl FlexContainer {
tracing::instrument(
name = "FlexContainer::layout",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
pub(crate) fn layout(
@@ -2689,7 +2691,8 @@ impl FlexItemBox {
tracing::instrument(
name = "FlexContainer::layout_for_block_content_size",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
fn layout_for_block_content_size(
diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs
index 12519849c21..49c65c9707d 100644
--- a/components/layout_2020/table/layout.rs
+++ b/components/layout_2020/table/layout.rs
@@ -1641,7 +1641,12 @@ impl<'a> TableLayout<'a> {
/// only be be called after calling [`TableLayout.compute_measures`].
#[cfg_attr(
feature = "tracing",
- tracing::instrument(name = "Table::layout", skip_all, fields(servo_profiling = true))
+ tracing::instrument(
+ name = "Table::layout",
+ skip_all,
+ fields(servo_profiling = true),
+ level = "trace",
+ )
)]
fn layout(
mut self,
@@ -2626,7 +2631,8 @@ impl Table {
tracing::instrument(
name = "Table::inline_content_sizes",
skip_all,
- fields(servo_profiling = true)
+ fields(servo_profiling = true),
+ level = "trace",
)
)]
pub(crate) fn inline_content_sizes(
diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs
index fb28b16a08f..8e596e27c9e 100644
--- a/components/layout_thread_2020/lib.rs
+++ b/components/layout_thread_2020/lib.rs
@@ -255,7 +255,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn add_stylesheet(
&mut self,
@@ -278,7 +278,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn remove_stylesheet(&mut self, stylesheet: ServoArc<Stylesheet>) {
let guard = stylesheet.shared_lock.read();
@@ -290,7 +290,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_content_box(&self, node: OpaqueNode) -> Option<UntypedRect<Au>> {
process_content_box_request(node, self.fragment_tree.borrow().clone())
@@ -298,7 +298,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_content_boxes(&self, node: OpaqueNode) -> Vec<UntypedRect<Au>> {
process_content_boxes_request(node, self.fragment_tree.borrow().clone())
@@ -306,7 +306,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_client_rect(&self, node: OpaqueNode) -> UntypedRect<i32> {
process_node_geometry_request(node, self.fragment_tree.borrow().clone())
@@ -314,7 +314,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_element_inner_outer_text(
&self,
@@ -335,7 +335,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_nodes_from_point(
&self,
@@ -361,7 +361,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_offset_parent(&self, node: OpaqueNode) -> OffsetParentResponse {
process_offset_parent_query(node, self.fragment_tree.borrow().clone())
@@ -369,7 +369,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_resolved_style(
&self,
@@ -408,7 +408,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_resolved_font_style(
&self,
@@ -444,7 +444,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_scrolling_area(&self, node: Option<OpaqueNode>) -> UntypedRect<i32> {
process_node_scroll_area_request(node, self.fragment_tree.borrow().clone())
@@ -452,7 +452,7 @@ impl Layout for LayoutThread {
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn query_text_indext(
&self,
@@ -700,7 +700,7 @@ impl LayoutThread {
/// The high-level routine that performs layout.
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip_all, fields(servo_profiling = true))
+ tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
)]
fn handle_reflow(&mut self, data: &mut ScriptReflowResult) {
let document = unsafe { ServoLayoutNode::new(&data.document) };
@@ -822,13 +822,8 @@ impl LayoutThread {
if token.should_traverse() {
#[cfg(feature = "tracing")]
- let span = tracing::span!(
- tracing::Level::TRACE,
- "driver::traverse_dom",
- servo_profiling = true
- );
- #[cfg(feature = "tracing")]
- let _enter = span.enter();
+ let _span =
+ tracing::trace_span!("driver::traverse_dom", servo_profiling = true).entered();
let dirty_root: ServoLayoutNode =
driver::traverse_dom(&traversal, token, rayon_pool).as_node();
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index d400dc64a9a..74441979658 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -226,7 +226,11 @@ where
{
#[cfg_attr(
feature = "tracing",
- tracing::instrument(skip(embedder, window), fields(servo_profiling = true))
+ tracing::instrument(
+ skip(embedder, window),
+ fields(servo_profiling = true),
+ level = "trace",
+ )
)]
#[allow(clippy::new_ret_no_self)]
pub fn new(