getGpuDmaBufUsageKb: Report usage in Kilobytes
getGpuDmabufUsageKb currently reports the total size of
dma-bufs attached by the GPU device from
/sys/kernel/dmabuf/buffer/<inode>/size nodes. However these
sysfs nodes report the buffer size in bytes.
Convert the value returned by getGpuDmaBufUsageKb to KB.
Bug: 193403146
Test: Manual
Change-Id: Ie17382794f7e4db34ddadf75488d8f82de435ae0
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index f379ba0..5814a18 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -877,7 +877,7 @@
continue;
}
- sizeKb += importer_info->second.size;
+ sizeKb += importer_info->second.size / 1024;
}
return sizeKb;