summaryrefslogtreecommitdiffstats
path: root/tools/procmem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libmeminfo: Add THP field to procmem outputKalesh Singh2021-04-201-15/+16
| | | | | | | | | In preparation for THP support, add the size of the VMA that is backed by THPs to procmem output. Bug: 165836290 Test: procmem $pid Change-Id: Ic4908eeca7f4111c99c53c796be9a48d62daca8a
* libmeminfo: Report VMA flags in procmem reportSuren Baghdasaryan2019-09-261-10/+19
| | | | | | | | | | Add VMA flags into procmem report so that we can distinguish different sections of an executable or a library. Bug: 138148041 Test: procmem -h <PID> Change-Id: I062464aa1f1c508bcc8ef05a6d9cfad9a4318d95 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* meminfo: Remove unnecessary working set statsSandeep Patil2019-01-141-6/+6
| | | | | | | | | | | | | The Vma and ProcMemInfo objects do not need separate stats objects for storing working set. The Vma either has working set or memory usage information and never both. Bug: 111694435 Test: libmeminfo_test 1 Change-Id: I2df05f7e750bbba4325474633e705d6d68dd2ccb Merged-In: I2df05f7e750bbba4325474633e705d6d68dd2ccb Signed-off-by: Sandeep Patil <sspatil@google.com>
* meminfo: Use getprogname(3) in all tools.Sandeep Patil2018-12-301-7/+7
| | | | | | | | Test: procrank2 -h;librank2 -h;procmem2 -h Bug: none Change-Id: Ieccd943b7140a7866694eea047969500bb3bb972 Signed-off-by: Sandeep Patil <sspatil@google.com>
* procmem2: Finish implementing all optionsSandeep Patil2018-12-071-55/+78
| | | | | | | | | | | | | | | | | | | In the same time replace iomanipulators with ::android::base::StringPrintf which makes the output much more readable and the overall program simpler. Bug: 114325007 Bug: 111694435 Test: procmem 1 Test: procmem -W 1 Test: procmem -u 1 Test: procmem -p 1 Test: procmem -w 1 Test: procmem -w -u 1 Test: procmem -w -p 1 Change-Id: Ibf7ef59b24dfcb851c78a3b2fad672d96a708b98 Signed-off-by: Sandeep Patil <sspatil@google.com>
* libmeminfo: Add support to reset workingset without procmeminfo objectsSandeep Patil2018-12-051-10/+8
| | | | | | | | | Bug: 114325007 Bug: 111694435 Test: libmeminfo_test 1 Change-Id: I816809cda13983e47294a956347a27085397cbcf Signed-off-by: Sandeep Patil <sspatil@google.com>
* libmeminfo: Add libmeminfo to gather global and per-process memory statsSandeep Patil2018-11-051-0/+171
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>