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>
This commit is contained in:
Delan Azabani 2024-11-19 10:53:43 +08:00 committed by GitHub
parent 9a98852806
commit caf2467649
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 158 additions and 164 deletions

View file

@ -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();