diff options
author | Rafal Slawik <rslawik@google.com> | 2019-09-24 20:00:18 +0100 |
---|---|---|
committer | Rafal Slawik <rslawik@google.com> | 2019-09-24 20:13:16 +0100 |
commit | 21d3f5130d17fd8c0e1d176fded524530f0c54ac (patch) | |
tree | 48734a7d9638c3bb55386dafbaf7b80551306b85 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | a620de30f49b5dd0b2bf062462dbe5820c5d22b8 (diff) |
Parse /proc/pid/status for memory only once
Read and parse /proc/pid/status for native processes only once.
Previously, it was read twice (getUidForPid and read*FromProcfs) and
regular expressions were applied to its contents few times.
A single read also allowed to simplify the code: use null to represent
failed read.
Bug: 140986627
Test: atest ProcfsMemoryUtilTest
Test: atest UidAtomTests#testProcessMemorySnapshot
Test: atest UidAtomTests#testProcessMemoryHighWaterMark
Test: atest UidAtomTests#testNativeProcessMemoryState
Change-Id: I09d05b663f99602fcfacae253af7349989d48749
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions