Report detailed RSS measurements from /proc/<pid>/smaps on Linux.

All anonymous segments are aggregated into a single measurement, as are
all segments smaller than 512 KiB.

Example output:

      142.89: resident-according-to-smaps
       97.84: - anonymous (rw-p)
       23.98: - /home/njn/moz/servo/components/servo/target/servo (r-xp)
        6.58: - [heap] (rw-p)
        5.36: - other
        3.51: - /usr/lib/x86_64-linux-gnu/dri/i965_dri.so (r-xp)
        1.33: - /lib/x86_64-linux-gnu/libc-2.19.so (r-xp)
        0.93: - /home/njn/moz/servo/components/servo/target/servo (r--p)
        0.76: - /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 (r-xp)
        0.74: - /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (r-xp)
        0.50: - /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (r-xp)
        0.50: - /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1 (r-xp)
        0.45: - /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 (r-xp)
        0.43: - /lib/x86_64-linux-gnu/libm-2.19.so (r-xp)
This commit is contained in:
Nicholas Nethercote 2015-02-09 23:00:27 -08:00
parent 121394a121
commit 34a384241a
6 changed files with 144 additions and 9 deletions

View file

@ -696,6 +696,11 @@ dependencies = [
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rustc-serialize"
version = "0.2.12"
@ -867,6 +872,7 @@ dependencies = [
"libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.1.0 (git+https://github.com/servo/rust-selectors)",
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",