mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
layout: Measure stacking context tree in layout thread memory report (#38762)
Measures the memory usage of the stacking context tree in the memory report of the layout thread by adding `MallocSizeOf` to `StackingContextTree` and all the types required for that. Also requires adding `MallocSizeOf` to some webrender types. Testing: Manually looked at about:memory <img width="636" height="241" alt="image" src="https://github.com/user-attachments/assets/6bf9d65a-0bf0-4a99-99b5-ddedba3269c1" /> Fixes: https://github.com/servo/servo/issues/38725 --------- Signed-off-by: Rahul Menon <menonrahul02@gmail.com>
This commit is contained in:
parent
634c1897cf
commit
9cd019403f
7 changed files with 53 additions and 23 deletions
|
@ -459,6 +459,12 @@ impl Layout for LayoutThread {
|
|||
.unwrap_or_default(),
|
||||
});
|
||||
|
||||
reports.push(Report {
|
||||
path: path![formatted_url, "layout-thread", "stacking-context-tree"],
|
||||
kind: ReportKind::ExplicitJemallocHeapSize,
|
||||
size: self.stacking_context_tree.size_of(ops),
|
||||
});
|
||||
|
||||
reports.push(self.image_cache.memory_report(formatted_url, ops));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue