OHOS CI: Fix resident-smaps recording (#42985)

Because of the move of the reporting function to
update_user_interface_state and the multiple events of
LoadStatus::Complete, the previous reporting did not work correctly
anymore.

This fixes it by manually summing up the reports for
'resident-according-to-smaps' and using the hitrace-bencher
point_filter_type Largest.

This should restore the bencher graph.

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

Testing: No automatic test but manual test here:
https://github.com/Narfinger/servo/actions/runs/22617931816

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger
2026-03-03 23:28:21 +09:00
committed by GitHub
parent 27fb3340c8
commit c204a799a7
2 changed files with 13 additions and 6 deletions

View File

@@ -136,10 +136,17 @@ impl PlatformWindow for EmbeddedPlatformWindow {
.results
.first()
.expect("We should have some memory report");
for report in &reports.reports {
let path = String::from("servo_memory_profiling:") + &report.path.join("/");
hitrace::trace_metric_str(&path, report.size as i64);
}
let search_string = String::from("resident-according-to-smaps");
let sum = reports
.reports
.iter()
.filter(|report| report.path.contains(&search_string))
.map(|report| report.size)
.sum::<usize>();
hitrace::trace_metric_str(
"servo_memory_profiling:resident-according-to-smaps/sum",
sum as i64,
);
});
}
}