mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Gate all use of tracing
behind Cargo feature (#33845)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
103d3aa7bb
commit
fa1f7e5839
15 changed files with 534 additions and 156 deletions
|
@ -19,7 +19,6 @@ use style::values::generics::flex::GenericFlexBasis as FlexBasis;
|
|||
use style::values::generics::length::{GenericLengthPercentageOrAuto, LengthPercentageOrNormal};
|
||||
use style::values::specified::align::AlignFlags;
|
||||
use style::Zero;
|
||||
use tracing::instrument;
|
||||
|
||||
use super::geom::{FlexAxis, FlexRelativeRect, FlexRelativeSides, FlexRelativeVec2};
|
||||
use super::{FlexContainer, FlexContainerConfig, FlexItemBox, FlexLevelBox};
|
||||
|
@ -340,10 +339,13 @@ struct FlexItemBoxInlineContentSizesInfo {
|
|||
}
|
||||
|
||||
impl FlexContainer {
|
||||
#[instrument(
|
||||
name = "FlexContainer::inline_content_sizes",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
#[cfg_attr(
|
||||
feature = "tracing",
|
||||
tracing::instrument(
|
||||
name = "FlexContainer::inline_content_sizes",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
)
|
||||
)]
|
||||
pub fn inline_content_sizes(
|
||||
&mut self,
|
||||
|
@ -551,10 +553,13 @@ impl FlexContainer {
|
|||
}
|
||||
|
||||
/// <https://drafts.csswg.org/css-flexbox/#layout-algorithm>
|
||||
#[instrument(
|
||||
name = "FlexContainer::layout",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
#[cfg_attr(
|
||||
feature = "tracing",
|
||||
tracing::instrument(
|
||||
name = "FlexContainer::layout",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
)
|
||||
)]
|
||||
pub(crate) fn layout(
|
||||
&self,
|
||||
|
@ -2490,10 +2495,13 @@ impl FlexItemBox {
|
|||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[instrument(
|
||||
name = "FlexContainer::layout_for_block_content_size",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
#[cfg_attr(
|
||||
feature = "tracing",
|
||||
tracing::instrument(
|
||||
name = "FlexContainer::layout_for_block_content_size",
|
||||
skip_all,
|
||||
fields(servo_profiling = true)
|
||||
)
|
||||
)]
|
||||
fn layout_for_block_content_size(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue