Add total size of DMA-BUFs exported to 'dumpsys meminfo'

When ION support is not detected, print the total size of DMA-BUFs
exported as part of dumpsys meminfo.

Bug: 167709539
Test: dumpsys meminfo
Change-Id: I3439a8f00cf1aef37e5043b505ed53d47a8a4756
Merged-In: I3439a8f00cf1aef37e5043b505ed53d47a8a4756
This commit is contained in:
Hridya Valsaraju
2021-01-27 13:02:56 -08:00
parent 6ae0be89b9
commit 363d44d7a0
3 changed files with 48 additions and 5 deletions

View File

@@ -2550,6 +2550,14 @@ public final class Debug
*/
public static native long getZramFreeKb();
/**
* Return total memory size in kilobytes for exported DMA-BUFs or -1 if
* the DMA-BUF sysfs stats at /sys/kernel/dmabuf/buffers could not be read.
*
* @hide
*/
public static native long getDmabufTotalExportedKb();
/**
* Return memory size in kilobytes allocated for ION heaps or -1 if
* /sys/kernel/ion/total_heaps_kb could not be read.