diff --git a/components/layout_2020/display_list/clip_path.rs b/components/layout_2020/display_list/clip_path.rs index 299de01ad2a..0a0b40bc7fd 100644 --- a/components/layout_2020/display_list/clip_path.rs +++ b/components/layout_2020/display_list/clip_path.rs @@ -65,6 +65,14 @@ pub(super) fn build_clip_path_clip_chain_if_necessary( } } +#[cfg_attr( + feature = "tracing", + tracing::instrument( + name = "display_list::build_simple_shape", + skip_all, + fields(servo_profiling = true) + ) +)] fn build_simple_shape( shape: BasicShape, layout_box: LayoutRect, diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index baf0cd890be..34c54a10848 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -181,6 +181,10 @@ impl DisplayList { fragment_tree: &FragmentTree, root_stacking_context: &StackingContext, ) -> (FnvHashMap>, bool) { + #[cfg(feature = "tracing")] + let span = tracing::span!(tracing::Level::TRACE, "display_list::build"); + #[cfg(feature = "tracing")] + let _enter = span.enter(); 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 1571dd999ca..8ba4794b0d9 100644 --- a/components/layout_2020/display_list/stacking_context.rs +++ b/components/layout_2020/display_list/stacking_context.rs @@ -101,6 +101,14 @@ impl DisplayList { SpatialTreeItemKey::new(pipeline_tag, self.spatial_tree_count) } + #[cfg_attr( + feature = "tracing", + tracing::instrument( + name = "display_list::build_stacking_context_tree", + skip_all, + fields(servo_profiling = true) + ) + )] pub fn build_stacking_context_tree( &mut self, fragment_tree: &FragmentTree,