Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 823d4651 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

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
Merged-In: Ie17382794f7e4db34ddadf75488d8f82de435ae0
parent 6f271495
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -880,7 +880,7 @@ static jlong android_os_Debug_getGpuDmaBufUsageKb(JNIEnv* env, jobject clazz) {
            continue;
        }

        sizeKb += importer_info->second.size;
        sizeKb += importer_info->second.size / 1024;
    }

    return sizeKb;