Skip to content

layout: Remove the obsolete layout tracing functionality#35001

Merged
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:remove-trace-layout
Jan 15, 2025
Merged

layout: Remove the obsolete layout tracing functionality#35001
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:remove-trace-layout

Conversation

@mrobinson
Copy link
Copy Markdown
Member

There were two kinds of layout tracing controlled by the same debugging
option:

  • modern layout: Functionality that dumped a JSON serialization of the
    layout tree before and after layout.
  • legacy layout: A scope based tracing that reported the process of
    layout in a structured way.

I don't think anyone working on layout is using either of these two
features. For modern layout requiring data structure to implement
serde serialization is incredibly inconvenient and also generates a
lot of extra code.

We also have a more modern tracing functionality based on perfetto that
we have started to use for layout and IMO it's actually being used and
more robust.

Signed-off-by: Martin Robinson [email protected]


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes, because it just removes an old debugging feature.

There were two kinds of layout tracing controlled by the same debugging
option:

 - modern layout: Functionality that dumped a JSON serialization of the
   layout tree before and after layout.
 - legacy layout: A scope based tracing that reported the process of
   layout in a structured way.

I don't think anyone working on layout is using either of these two
features. For modern layout requiring data structure to implement
`serde` serialization is incredibly inconvenient and also generates a
lot of extra code.

We also have a more modern tracing functionality based on perfetto that
we have started to use for layout and IMO it's actually being used and
more robust.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson mrobinson force-pushed the remove-trace-layout branch from 1aa1ce4 to ae36a7f Compare January 15, 2025 11:28
@mrobinson mrobinson added this pull request to the merge queue Jan 15, 2025
Merged via the queue into servo:main with commit e81951a Jan 15, 2025
@mrobinson mrobinson deleted the remove-trace-layout branch January 15, 2025 13:50
Loirooriol added a commit to Loirooriol/servo that referenced this pull request Dec 10, 2025
These structs used to be different when they were added in servo#29699:
`BaseFragment` had a `debug_id` field, while `BaseFragmentInfo` didn't.
But this field was later removed in servo#35001, so the structs became
identical.

Therefore, this just unified them. I'm picking `BaseFragmentInfo` as the
name, since it was the most frequently used of the two.

Signed-off-by: Oriol Brufau <[email protected]>
Loirooriol added a commit to Loirooriol/servo that referenced this pull request Dec 10, 2025
These structs used to be different when they were added in servo#29699:
`BaseFragment` had a `debug_id` field, while `BaseFragmentInfo` didn't.
But this field was later removed in servo#35001, so the structs became
identical.

Therefore, this just unified them. I'm picking `BaseFragmentInfo` as the
name, since it was the most frequently used of the two.

Signed-off-by: Oriol Brufau <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2025
These structs used to be different when they were added in #29699:
`BaseFragment` had a `debug_id` field, while `BaseFragmentInfo` didn't.
But this field was later removed in #35001, so the structs became
identical.

Therefore, this patch just unifies them. I'm picking `BaseFragmentInfo`
as the name, since it was the most frequently used of the two.

Testing: Not needed, no change in behavior

Signed-off-by: Oriol Brufau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants