Remove layout-2013 profiling categories (#37014)

This change also removes the ProfilingCategory::variant_name function,
because strum_macros::IntoStaticStr is already being used and does the
same thing.

Testing: This change compiles and that's good enough

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-15 18:54:02 +02:00 committed by GitHub
parent 3af0992ead
commit f9382fcaa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 47 deletions

View file

@ -8,7 +8,6 @@ use log::warn;
use malloc_size_of_derive::MallocSizeOf;
use serde::{Deserialize, Serialize};
use servo_config::opts;
use strum_macros::IntoStaticStr;
use time::Duration;
#[derive(Clone, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize)]
@ -59,9 +58,7 @@ pub enum ProfilerMsg {
/// Usage sites of variants marked “Rust tracing only” are not visible to rust-analyzer.
#[repr(u32)]
#[derive(
Clone, Copy, Debug, Deserialize, Eq, Hash, IntoStaticStr, Ord, PartialEq, PartialOrd, Serialize,
)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum ProfilerCategory {
/// The compositor is rasterising or presenting.
///
@ -71,17 +68,6 @@ pub enum ProfilerCategory {
/// The script thread is doing layout work.
LayoutPerform = 0x10,
/// Events currently only used by Layout 2013.
LayoutStyleRecalc = 0x11,
LayoutTextShaping = 0x12,
LayoutRestyleDamagePropagation = 0x13,
LayoutGeneratedContent = 0x18,
LayoutFloatPlacementSpeculation = 0x1a,
LayoutMain = 0x1b,
LayoutStoreOverflow = 0x1c,
LayoutParallelWarmup = 0x1d,
LayoutDispListBuild = 0x1e,
ImageSaving = 0x51,
ScriptAttachLayout = 0x60,
ScriptConstellationMsg = 0x61,
@ -139,15 +125,6 @@ impl ProfilerCategory {
match self {
ProfilerCategory::Compositing => "Compositing",
ProfilerCategory::LayoutPerform => "LayoutPerform",
ProfilerCategory::LayoutStyleRecalc => "LayoutStyleRecalc",
ProfilerCategory::LayoutTextShaping => "LayoutTextShaping",
ProfilerCategory::LayoutRestyleDamagePropagation => "LayoutRestyleDamagePropagation",
ProfilerCategory::LayoutGeneratedContent => "LayoutGeneratedContent",
ProfilerCategory::LayoutFloatPlacementSpeculation => "LayoutFloatPlacementSpeculation",
ProfilerCategory::LayoutMain => "LayoutMain",
ProfilerCategory::LayoutStoreOverflow => "LayoutStoreOverflow",
ProfilerCategory::LayoutParallelWarmup => "LayoutParallelWarmup",
ProfilerCategory::LayoutDispListBuild => "LayoutDispListBuild",
ProfilerCategory::ImageSaving => "ImageSaving",
ProfilerCategory::ScriptAttachLayout => "ScriptAttachLayout",
ProfilerCategory::ScriptConstellationMsg => "ScriptConstellationMsg",