Skip to content

devtools: Implement MallocSizeOf for DevtoolsInstance#42478

Merged
jdm merged 2 commits intoservo:mainfrom
Narfinger:devtools-mem
Feb 10, 2026
Merged

devtools: Implement MallocSizeOf for DevtoolsInstance#42478
jdm merged 2 commits intoservo:mainfrom
Narfinger:devtools-mem

Conversation

@Narfinger
Copy link
Copy Markdown
Contributor

This implements MallocSizeOf for DevtoolsInstance. Major changes:

  • Newtype for ActorRegistry because AtomicRefCell<HashMap<String, Arc>> did not like mallocsizeof (even with trait bound on Actor)
  • Implement MallocSizeOf for BTreeSet.
  • Implement MallocSizeOf of 0 for AtomicU32 and TcpStream
  • Ignore a couple of MallocSizeof for http::Method, http::HeaderMap and json::Value

Signed-off-by: Narfinger Narfinger@users.noreply.github.com

Testing: Compilation is the test.
Fixes: Part of addressing #42453

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 9, 2026
@Narfinger Narfinger requested a review from jdm February 9, 2026 15:53
Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread components/devtools/actors/long_string.rs Outdated
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-review There is new code that needs to be reviewed. labels Feb 9, 2026
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@jdm jdm added this pull request to the merge queue Feb 10, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Feb 10, 2026
@jdm jdm added this pull request to the merge queue Feb 10, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Feb 10, 2026
Merged via the queue into servo:main with commit 870576f Feb 10, 2026
39 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 10, 2026
@Narfinger Narfinger deleted the devtools-mem branch February 11, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants