Merge "Fix Lost RAM calculation by accounting for ION mapped heaps" into rvc-dev am: 49644a3404

Change-Id: I723e617a9557eb298ee51cae4b22dda7ebc8cf05
This commit is contained in:
Suren Baghdasaryan
2020-05-13 17:14:36 +00:00
committed by Automerger Merge Worker

View File

@@ -13597,7 +13597,9 @@ public class ActivityManagerService extends IActivityManager.Stub
pw.print(" unmapped + ");
pw.print(stringifyKBSize(ionPool));
pw.println(" pools)");
kernelUsed += ionUnmapped;
// Note: mapped ION memory is not accounted in PSS due to VM_PFNMAP flag being
// set on ION VMAs, therefore consider the entire ION heap as used kernel memory
kernelUsed += ionHeap;
}
final long lostRAM = memInfo.getTotalSizeKb() - (totalPss - totalSwapPss)
- memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
@@ -14403,7 +14405,9 @@ public class ActivityManagerService extends IActivityManager.Stub
memInfoBuilder.append(" ION: ");
memInfoBuilder.append(stringifyKBSize(ionHeap + ionPool));
memInfoBuilder.append("\n");
kernelUsed += ionUnmapped;
// Note: mapped ION memory is not accounted in PSS due to VM_PFNMAP flag being
// set on ION VMAs, therefore consider the entire ION heap as used kernel memory
kernelUsed += ionHeap;
}
memInfoBuilder.append(" Used RAM: ");
memInfoBuilder.append(stringifyKBSize(