platform_system_core/libmeminfo
Sandeep Patil a14119d069 Add procrank2
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>
2018-12-07 09:15:16 -08:00
..
include/meminfo libmeminfo: defer maps reading only when required for procmeminfo 2018-12-05 09:31:10 -08:00
testdata1 libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
testdata2 libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
tools Add procrank2 2018-12-07 09:15:16 -08:00
.clang-format libmeminfo: Add libmeminfo to gather global and per-process memory stats 2018-11-05 10:42:46 -08:00
Android.bp libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
libmeminfo_benchmark.cpp libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
libmeminfo_test.cpp libmeminfo: defer maps reading only when required for procmeminfo 2018-12-05 09:31:10 -08:00
meminfo_private.h libmeminfo: Add libmeminfo to gather global and per-process memory stats 2018-11-05 10:42:46 -08:00
pageacct.cpp libmeminfo: Add libmeminfo to gather global and per-process memory stats 2018-11-05 10:42:46 -08:00
procmeminfo.cpp libmeminfo: defer maps reading only when required for procmeminfo 2018-12-05 09:31:10 -08:00
sysmeminfo.cpp libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00