tools/android: Estimate the footprint of a process.

Private memory footprint does not accurately reflect the additional footprint of
a child process, as it does not account for page tables or shared memory for
instance, but it includes memory footprint inherited (and shared with) the
Android zygote.

This makes a few assumptions to compute the memory footprint that are detailed
in the code, and would be most accurate on a high-memory device shortly after
the process is created, to make sure not to undercount swap.

Bug: 973813
Change-Id: Ifa4f4e36c0ddc3316f3b6a74fb5b1151b4337b11
Reviewed-by: Matthew Cary (CET) <>
Reviewed-by: Egor Pasko <>
Commit-Queue: Benoit L <>
Cr-Original-Commit-Position: refs/heads/master@{#668795}
Cr-Mirrored-Commit: 96b0cc87e0871388e60d94a7f0393dd8bd169b67
1 file changed