platform_system_core/libmeminfo/include/meminfo
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
..
meminfo.h libmeminfo: Add support for counting swap pages 2018-12-04 14:02:28 -08:00
pageacct.h libmeminfo: Add libmeminfo to gather global and per-process memory stats 2018-11-05 10:42:46 -08:00
procmeminfo.h libmeminfo: defer maps reading only when required for procmeminfo 2018-12-05 09:31:10 -08:00
sysmeminfo.h libmeminfo: Add ReadSysMemInfo variants 2018-12-11 10:38:33 -08:00