platform_system_core/libmeminfo
Sandeep Patil 2f0b6ebfbe libmeminfo: Add ReadSysMemInfo variants
The new variant is primarily used in framework. See: go/ag/5780400
for usage. Also add tests, benchmarks and fix several issues found in SysMemInfo
class.

New benchmark results are:
--------------------------------------------------------------
Benchmark                       Time           CPU Iterations
--------------------------------------------------------------
BM_ReadMemInfo_old           7726 ns       7696 ns      90201
BM_ReadMemInfo_new           7554 ns       7525 ns      90358
BM_ZramTotal_old             6446 ns       6406 ns     108361
BM_ZramTotal_new             6529 ns       6488 ns     106545
BM_MemInfoWithZram_old      14485 ns      14412 ns      48492
BM_MemInfoWithZram_new      20572 ns      20459 ns      33438
--------------------------------------------------------------

The reason for BM_MemInfoWithZram_new shows worse numbers is because
the new API also tries to find more than 1 zram device (if it exists).
The old implementation hard coded everything to "/sys/block/zram0/"

Test: libmeminfo_test 1
Bug: 114325007
Bug: 111694435

Change-Id: I246d9e9a54986ee9b2542d1eaac79ecf7310b23a
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-12-11 10:38:33 -08:00
..
include/meminfo libmeminfo: Add ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00
testdata1 libmeminfo: Add ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00
testdata2 libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
tools procmem2: Finish implementing all options 2018-12-07 09:16:35 -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 ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00
libmeminfo_test.cpp libmeminfo: Add ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00
meminfo_private.h libmeminfo: Add libmeminfo to gather global and per-process memory stats 2018-11-05 10:42:46 -08:00
OWNERS Add OWNERS file 2018-12-07 09:29:03 -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 ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00