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
Loading
Please register or sign in to comment