platform_system_core/libmeminfo
Sandeep Patil c24f1e3c63 meminfo: Add ReadVmallocInfo()
This is to replace occurrences of get_allocated_vmalloc_memory().
Splitting into libmeminfo already found a bug with current code which
failed to account for memory allocated by modules due to addition of
the extra [%module_name%] in __builtin_return_address().

  See: https://elixir.bootlin.com/linux/latest/source/kernel/kallsyms.c#L373

Also improves the performance a bit in the process.

Bug: 119639955
Bug: 111694435
Test: libmeminfo_test 1 --gtest_filter=SysMemInfoParser.TestVmallocInfo
Test: libmeminfo_benchmark --benchmark_filter=BM_VmallocInfo_*
Result:
----------------------------------------------------------------
Benchmark                         Time           CPU Iterations
----------------------------------------------------------------
BM_VmallocInfo_old_fixed     459239 ns     457268 ns       1532
BM_VmallocInfo_new           386032 ns     384353 ns       1821
----------------------------------------------------------------

Change-Id: I1b6606ac73b5cc2dac31d24487b462ec9abfb2ef
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-01-07 09:41:55 -08:00
..
include/meminfo meminfo: Add ReadVmallocInfo() 2019-01-07 09:41:55 -08:00
testdata1 meminfo: Add ReadVmallocInfo() 2019-01-07 09:41:55 -08:00
testdata2 libmeminfo: Add support to read zram memory consumption 2018-12-04 15:59:39 -08:00
tools meminfo: Use getprogname(3) in all tools. 2018-12-30 13:42:20 -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 meminfo: Add ReadVmallocInfo() 2019-01-07 09:41:55 -08:00
libmeminfo_test.cpp meminfo: Add ReadVmallocInfo() 2019-01-07 09:41:55 -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 meminfo: Add ReadVmallocInfo() 2019-01-07 09:41:55 -08:00