Commit graph

5 commits

Author SHA1 Message Date
Colin Cross
3defd5237f Fix darwin build
Disable host libmeminfo and showmap when building on darwin.

Test: m on darwin
Change-Id: Ie9342eff8d9e33c706edbb068d4ec405b480e599
2019-07-18 16:25:15 -07:00
Mathieu Chartier
c0c28faa97 Re-make showmap host supported
Also fix bugs that made it not compile on host. Motivation is to be
able to analyze smaps files easily on the host.

Test: showmap -f maps.txt
Bug: 137034556

Change-Id: I7b8ca1237ce1ec17d02cd5217c73b62ee978cb05
2019-07-17 12:28:27 -07:00
Sandeep Patil
dfa00a7729 meminfo: Remove libpagemap dependency
Remove all tests that validated libmeminfo against the libpagemap
implementation and make libmeminfo_test self sufficient.

Bug: 111694435
Bug: 113035067
Test: libmeminfo_test
Change-Id: I21b9a0e2c71ef3f1f672a3b1de8080c0c36b4bfe
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-28 15:05:52 -08:00
Sandeep Patil
70fa72dd01 libmeminfo: Add support to read zram memory consumption
Bug: 114325007
Bug: 111694435
Test: libmeminfo_test 1 --gtest_filter=SysMemInfoParse.TestZramTotal
Benchmark: libmeminfo_benchmark --benchmark_filter=BM_.*ZramTotal
Benchmark Result on Blueline:
-----------------------------------------------------------
Benchmark                    Time           CPU Iterations
-----------------------------------------------------------
BM_OldReadZramTotal       3857 ns       3839 ns     134096
BM_NewReadZramTotal       4461 ns       4440 ns     157341

Change-Id: I5220fa17b101981ef859179960fe78fe68e84852
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-12-04 15:59:39 -08:00
Sandeep Patil
54d8721374 libmeminfo: Add libmeminfo to gather global and per-process memory stats
The library is expected to be a unified place for all components to read
both global and per-process memory accounting form kernel including
getting the working set. This change adds the PageInfo, MemInfo and
ProcMemInfo classes and verifies the implementation against libpagemap
for correctness.

Adds a procmem2 tool show the usage.

TODO: Plumbing in os_debug, add vmastats, zoneinfo etc parsing.

Test: libmeminfo_test 1
Test: procmem2 1
Test: procmem2 -h -W 1
Test: procmem2 -h -w 1
Test: libmeminfo_benchmark
Bug: 111694435
Bug: 114325007

Change-Id: I280440b1dc26a498170686d10fcf63f953a0dcbd
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-11-05 10:42:46 -08:00