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-on: https://chromium-review.googlesource.com/c/chromium/src/+/1657899
Reviewed-by: Matthew Cary (CET) <mattcary@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668795}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 96b0cc87e0871388e60d94a7f0393dd8bd169b67
1 file changed