mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
script: Include layout when collecting memory reports (#32204)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
bccbc87db7
commit
6065abcb6b
4 changed files with 13 additions and 12 deletions
|
@ -56,7 +56,7 @@ use metrics::{PaintTimeMetrics, ProfilerMetadataFactory};
|
|||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::{ImageCache, UsePlaceholder};
|
||||
use parking_lot::RwLock;
|
||||
use profile_traits::mem::{Report, ReportKind, ReportsChan};
|
||||
use profile_traits::mem::{Report, ReportKind};
|
||||
use profile_traits::path;
|
||||
use profile_traits::time::{
|
||||
self as profile_time, profile, TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType,
|
||||
|
@ -508,8 +508,7 @@ impl Layout for LayoutThread {
|
|||
self.registered_painters.0.insert(name, registered_painter);
|
||||
}
|
||||
|
||||
fn collect_reports(&self, reports_chan: ReportsChan) {
|
||||
let mut reports = vec![];
|
||||
fn collect_reports(&self, reports: &mut Vec<Report>) {
|
||||
// Servo uses vanilla jemalloc, which doesn't have a
|
||||
// malloc_enclosing_size_of function.
|
||||
let mut ops = MallocSizeOfOps::new(servo_allocator::usable_size, None, None);
|
||||
|
@ -536,8 +535,6 @@ impl Layout for LayoutThread {
|
|||
kind: ReportKind::ExplicitJemallocHeapSize,
|
||||
size: malloc_size_of_persistent_local_context(&mut ops),
|
||||
});
|
||||
|
||||
reports_chan.send(reports);
|
||||
}
|
||||
|
||||
fn reflow(&mut self, script_reflow: script_layout_interface::ScriptReflow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue