diff options
author | Sandeep Patil <sspatil@google.com> | 2019-01-01 16:04:04 -0800 |
---|---|---|
committer | Sandeep Patil <sspatil@google.com> | 2019-01-08 17:08:10 -0800 |
commit | 82a48b160a8ae4e7bf05e2df8bdde432b5854fc2 (patch) | |
tree | d86b5b1b26d1920d09d7b144f74c87cff6b9ae2f /libutils/Unicode.cpp | |
parent | fa2d8d55417d5e4acdd7dbabb1078643308af894 (diff) |
meminfo: Add Smaps(), showmap and friends.
Needed by showmap and also android_s_Debug to classify each allocation
into multiple heaps.
The APIs added are:
ForEachVmaFromFile - Global API to parse a file expected to be in the
same format as /proc/<pid>/smaps and make a callback for each VMA found.
ProcMemInfo::ForEachVma - Same as 'ForEachVmaFromFile' but for a
ProcMemInfo object corresponding to a process(pid).
ProcMemInfo::Smaps - Wrapper to ProcMemInfo::ForEachVma, except the
function collects 'struct Vma' in a member vector and returns the
reference for the same.
Added showmap2 using the APIs and the corresponding tests the same time.
Bug: 111694435
Test: showmap_test.sh
Test: libmeminfo_test 1
Change-Id: I3065809cf94ecf3da88529809701035c47a8ce34
Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions