diff options
| author | Sandeep Patil <sspatil@google.com> | 2018-12-29 14:34:20 -0800 |
|---|---|---|
| committer | Sandeep Patil <sspatil@google.com> | 2019-01-07 09:41:55 -0800 |
| commit | c24f1e3c6391e24ecab098d4206dadf2a06264ba (patch) | |
| tree | b2ca7783db6a0bbb4e824642a12e1b7f249682e8 /libunwindstack/tests/MemoryCacheTest.cpp | |
| parent | 3009be5cb62c7e3ad63dd7443a443bf9fbd569f4 (diff) | |
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>
Diffstat (limited to 'libunwindstack/tests/MemoryCacheTest.cpp')
0 files changed, 0 insertions, 0 deletions
