The Vma and ProcMemInfo objects do not need separate stats
objects for storing working set. The Vma either has working set
or memory usage information and never both.
Bug: 111694435
Test: libmeminfo_test 1
Change-Id: I2df05f7e750bbba4325474633e705d6d68dd2ccb
Merged-In: I2df05f7e750bbba4325474633e705d6d68dd2ccb
Signed-off-by: Sandeep Patil <sspatil@google.com>
Implement procrank using new libmeminfo APIs. procrank2 is functionally
equivalent to procrank except for the part where the old procrank would
print processes under each oomadj level if called with 'procrank -c -o'.
The output format of 'procrank2' is identical to that of 'procrank'.
'procrank2' also gives significant performance boost over 'procrank' but
does cost a more memory as the library is written to 99% use case where
callers almost always want to read the memory usage of hte process.
Bug: 114325007
Bug: 111694435
Test:
# adb push /google/data/ro/users/ss/sspatil/test-memutils.sh /data/local/tmp/
# adb push procmem2 /data/local/tmp && adb push procrank2 /data/local/tmp
# adb root && adb shell
$ cd /data/local/tmp/
$ chmod +x test-memutils.sh
$ ./test-memutils.sh 2>&1 | tee test.log
Test:
procrank:
0m00.43s real 0m00.11s user 0m00.32s system
procrank2:
0m00.42s real 0m00.05s user 0m00.36s system
Change-Id: I37b71a4625248e333ba01801c0d8d7ef348e4cfa
Signed-off-by: Sandeep Patil <sspatil@google.com>