Loading core/java/android/os/Debug.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -1956,7 +1956,21 @@ public final class Debug /** @hide */ /** @hide */ public static final int MEMINFO_UNEVICTABLE = 18; public static final int MEMINFO_UNEVICTABLE = 18; /** @hide */ /** @hide */ public static final int MEMINFO_COUNT = 19; public static final int MEMINFO_AVAILABLE = 19; /** @hide */ public static final int MEMINFO_ACTIVE_ANON = 20; /** @hide */ public static final int MEMINFO_INACTIVE_ANON = 21; /** @hide */ public static final int MEMINFO_ACTIVE_FILE = 22; /** @hide */ public static final int MEMINFO_INACTIVE_FILE = 23; /** @hide */ public static final int MEMINFO_CMA_TOTAL = 24; /** @hide */ public static final int MEMINFO_CMA_FREE = 25; /** @hide */ public static final int MEMINFO_COUNT = 26; /** /** * Retrieves /proc/meminfo. outSizes is filled with fields * Retrieves /proc/meminfo. outSizes is filled with fields Loading core/jni/android_os_Debug.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -587,6 +587,13 @@ enum { MEMINFO_ACTIVE, MEMINFO_ACTIVE, MEMINFO_INACTIVE, MEMINFO_INACTIVE, MEMINFO_UNEVICTABLE, MEMINFO_UNEVICTABLE, MEMINFO_AVAILABLE, MEMINFO_ACTIVE_ANON, MEMINFO_INACTIVE_ANON, MEMINFO_ACTIVE_FILE, MEMINFO_INACTIVE_FILE, MEMINFO_CMA_TOTAL, MEMINFO_CMA_FREE, MEMINFO_COUNT MEMINFO_COUNT }; }; Loading services/core/java/com/android/server/stats/pull/StatsPullAtomService.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -2408,7 +2408,20 @@ public class StatsPullAtomService extends SystemService { metrics.gpuTotalUsageKb, metrics.gpuTotalUsageKb, metrics.gpuPrivateAllocationsKb, metrics.gpuPrivateAllocationsKb, metrics.dmaBufTotalExportedKb, metrics.dmaBufTotalExportedKb, metrics.shmemKb)); metrics.shmemKb, metrics.totalKb, metrics.freeKb, metrics.availableKb, metrics.activeKb, metrics.inactiveKb, metrics.activeAnonKb, metrics.inactiveAnonKb, metrics.activeFileKb, metrics.inactiveFileKb, metrics.swapTotalKb, metrics.swapFreeKb, metrics.cmaTotalKb, metrics.cmaFreeKb)); return StatsManager.PULL_SUCCESS; return StatsManager.PULL_SUCCESS; } } Loading services/core/java/com/android/server/stats/pull/SystemMemoryUtil.java +26 −0 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,19 @@ final class SystemMemoryUtil { result.pageTablesKb = (int) mInfos[Debug.MEMINFO_PAGE_TABLES]; result.pageTablesKb = (int) mInfos[Debug.MEMINFO_PAGE_TABLES]; result.kernelStackKb = (int) mInfos[Debug.MEMINFO_KERNEL_STACK]; result.kernelStackKb = (int) mInfos[Debug.MEMINFO_KERNEL_STACK]; result.shmemKb = (int) mInfos[Debug.MEMINFO_SHMEM]; result.shmemKb = (int) mInfos[Debug.MEMINFO_SHMEM]; result.totalKb = (int) mInfos[Debug.MEMINFO_TOTAL]; result.freeKb = (int) mInfos[Debug.MEMINFO_FREE]; result.availableKb = (int) mInfos[Debug.MEMINFO_AVAILABLE]; result.activeKb = (int) mInfos[Debug.MEMINFO_ACTIVE]; result.inactiveKb = (int) mInfos[Debug.MEMINFO_INACTIVE]; result.activeAnonKb = (int) mInfos[Debug.MEMINFO_ACTIVE_ANON]; result.inactiveAnonKb = (int) mInfos[Debug.MEMINFO_INACTIVE_ANON]; result.activeFileKb = (int) mInfos[Debug.MEMINFO_ACTIVE_FILE]; result.inactiveFileKb = (int) mInfos[Debug.MEMINFO_INACTIVE_FILE]; result.swapTotalKb = (int) mInfos[Debug.MEMINFO_SWAP_TOTAL]; result.swapFreeKb = (int) mInfos[Debug.MEMINFO_SWAP_FREE]; result.cmaTotalKb = (int) mInfos[Debug.MEMINFO_CMA_TOTAL]; result.cmaFreeKb = (int) mInfos[Debug.MEMINFO_CMA_FREE]; result.totalIonKb = totalIonKb; result.totalIonKb = totalIonKb; result.gpuTotalUsageKb = gpuTotalUsageKb; result.gpuTotalUsageKb = gpuTotalUsageKb; result.gpuPrivateAllocationsKb = gpuPrivateAllocationsKb; result.gpuPrivateAllocationsKb = gpuPrivateAllocationsKb; Loading @@ -97,6 +110,19 @@ final class SystemMemoryUtil { public int pageTablesKb; public int pageTablesKb; public int kernelStackKb; public int kernelStackKb; public int shmemKb; public int shmemKb; public int totalKb; public int freeKb; public int availableKb; public int activeKb; public int inactiveKb; public int activeAnonKb; public int inactiveAnonKb; public int activeFileKb; public int inactiveFileKb; public int swapTotalKb; public int swapFreeKb; public int cmaTotalKb; public int cmaFreeKb; public int totalIonKb; public int totalIonKb; public int gpuTotalUsageKb; public int gpuTotalUsageKb; public int gpuPrivateAllocationsKb; public int gpuPrivateAllocationsKb; Loading Loading
core/java/android/os/Debug.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -1956,7 +1956,21 @@ public final class Debug /** @hide */ /** @hide */ public static final int MEMINFO_UNEVICTABLE = 18; public static final int MEMINFO_UNEVICTABLE = 18; /** @hide */ /** @hide */ public static final int MEMINFO_COUNT = 19; public static final int MEMINFO_AVAILABLE = 19; /** @hide */ public static final int MEMINFO_ACTIVE_ANON = 20; /** @hide */ public static final int MEMINFO_INACTIVE_ANON = 21; /** @hide */ public static final int MEMINFO_ACTIVE_FILE = 22; /** @hide */ public static final int MEMINFO_INACTIVE_FILE = 23; /** @hide */ public static final int MEMINFO_CMA_TOTAL = 24; /** @hide */ public static final int MEMINFO_CMA_FREE = 25; /** @hide */ public static final int MEMINFO_COUNT = 26; /** /** * Retrieves /proc/meminfo. outSizes is filled with fields * Retrieves /proc/meminfo. outSizes is filled with fields Loading
core/jni/android_os_Debug.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -587,6 +587,13 @@ enum { MEMINFO_ACTIVE, MEMINFO_ACTIVE, MEMINFO_INACTIVE, MEMINFO_INACTIVE, MEMINFO_UNEVICTABLE, MEMINFO_UNEVICTABLE, MEMINFO_AVAILABLE, MEMINFO_ACTIVE_ANON, MEMINFO_INACTIVE_ANON, MEMINFO_ACTIVE_FILE, MEMINFO_INACTIVE_FILE, MEMINFO_CMA_TOTAL, MEMINFO_CMA_FREE, MEMINFO_COUNT MEMINFO_COUNT }; }; Loading
services/core/java/com/android/server/stats/pull/StatsPullAtomService.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -2408,7 +2408,20 @@ public class StatsPullAtomService extends SystemService { metrics.gpuTotalUsageKb, metrics.gpuTotalUsageKb, metrics.gpuPrivateAllocationsKb, metrics.gpuPrivateAllocationsKb, metrics.dmaBufTotalExportedKb, metrics.dmaBufTotalExportedKb, metrics.shmemKb)); metrics.shmemKb, metrics.totalKb, metrics.freeKb, metrics.availableKb, metrics.activeKb, metrics.inactiveKb, metrics.activeAnonKb, metrics.inactiveAnonKb, metrics.activeFileKb, metrics.inactiveFileKb, metrics.swapTotalKb, metrics.swapFreeKb, metrics.cmaTotalKb, metrics.cmaFreeKb)); return StatsManager.PULL_SUCCESS; return StatsManager.PULL_SUCCESS; } } Loading
services/core/java/com/android/server/stats/pull/SystemMemoryUtil.java +26 −0 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,19 @@ final class SystemMemoryUtil { result.pageTablesKb = (int) mInfos[Debug.MEMINFO_PAGE_TABLES]; result.pageTablesKb = (int) mInfos[Debug.MEMINFO_PAGE_TABLES]; result.kernelStackKb = (int) mInfos[Debug.MEMINFO_KERNEL_STACK]; result.kernelStackKb = (int) mInfos[Debug.MEMINFO_KERNEL_STACK]; result.shmemKb = (int) mInfos[Debug.MEMINFO_SHMEM]; result.shmemKb = (int) mInfos[Debug.MEMINFO_SHMEM]; result.totalKb = (int) mInfos[Debug.MEMINFO_TOTAL]; result.freeKb = (int) mInfos[Debug.MEMINFO_FREE]; result.availableKb = (int) mInfos[Debug.MEMINFO_AVAILABLE]; result.activeKb = (int) mInfos[Debug.MEMINFO_ACTIVE]; result.inactiveKb = (int) mInfos[Debug.MEMINFO_INACTIVE]; result.activeAnonKb = (int) mInfos[Debug.MEMINFO_ACTIVE_ANON]; result.inactiveAnonKb = (int) mInfos[Debug.MEMINFO_INACTIVE_ANON]; result.activeFileKb = (int) mInfos[Debug.MEMINFO_ACTIVE_FILE]; result.inactiveFileKb = (int) mInfos[Debug.MEMINFO_INACTIVE_FILE]; result.swapTotalKb = (int) mInfos[Debug.MEMINFO_SWAP_TOTAL]; result.swapFreeKb = (int) mInfos[Debug.MEMINFO_SWAP_FREE]; result.cmaTotalKb = (int) mInfos[Debug.MEMINFO_CMA_TOTAL]; result.cmaFreeKb = (int) mInfos[Debug.MEMINFO_CMA_FREE]; result.totalIonKb = totalIonKb; result.totalIonKb = totalIonKb; result.gpuTotalUsageKb = gpuTotalUsageKb; result.gpuTotalUsageKb = gpuTotalUsageKb; result.gpuPrivateAllocationsKb = gpuPrivateAllocationsKb; result.gpuPrivateAllocationsKb = gpuPrivateAllocationsKb; Loading @@ -97,6 +110,19 @@ final class SystemMemoryUtil { public int pageTablesKb; public int pageTablesKb; public int kernelStackKb; public int kernelStackKb; public int shmemKb; public int shmemKb; public int totalKb; public int freeKb; public int availableKb; public int activeKb; public int inactiveKb; public int activeAnonKb; public int inactiveAnonKb; public int activeFileKb; public int inactiveFileKb; public int swapTotalKb; public int swapFreeKb; public int cmaTotalKb; public int cmaFreeKb; public int totalIonKb; public int totalIonKb; public int gpuTotalUsageKb; public int gpuTotalUsageKb; public int gpuPrivateAllocationsKb; public int gpuPrivateAllocationsKb; Loading