[starnix] Implement /proc/<pid>/smaps_rollup Android tools (procrank, dumpsys meminfo, bugreport_procdump) inspect /proc/<pid>/smaps_rollup for aggregate process memory. Without it, tools fall back to parsing full /proc/<pid>/smaps. On targets with many packages (e.g. Cuttlefish with full Android image, 350+ packages), traversing every VMA caused the DUMPSYS section in dumpstate to exceed its 90s timeout (taking 96s+) and bloated bugreport time to 8+ minutes in nested-VM CI. This change: 1. Implements /proc/<pid>/smaps_rollup via ProcSmapsRollupFile, returning aggregate metrics in O(1) from cached MemoryStats. 2. Estimates Pss, Private_Dirty, and Shared_Clean using MemoryStats so diagnostics reflect realistic sharing instead of collapsing PSS to RSS. 3. Returns ESRCH on read() for tasks without an mm (zombies, kthreads), matching Linux 6.6 procfs behavior. Benchmark on Cuttlefish with full Android userspace: - DUMPSYS duration: 96.6s (timed out) -> 34.6s (0 timeouts) - adb bugreport: 2m 53s -> 1m 32s Fixed: 552681199 Test: fx test procfs_test zombie_test Test: verified smaps_rollup and bugreport on Cuttlefish TAG=agy CONV=f5cfe3cb-60f9-48c9-8556-09a4e28af3f6 Change-Id: I3c1616b70482f42891359929d6fe4a18a41f75b7 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1781764 Reviewed-by: Robert Tarasov <tutankhamen@google.com> Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.