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

Commit 66d2190e authored by Kalesh Singh's avatar Kalesh Singh
Browse files

getDmabufMappedSizeKb: Use ReadDmaBufMapRefs()

To allow clients more flexibility AppendDmaBufInfo() is being removed.
It allowed reading both mapped and FD-referenced dmabufs, or just mapped
dmabufs if read_fdrefs was specified as false. Internally the function
called ReadDmaBufMapRefs() and ReadDmaBufFdRefs().

This change replaces AppendDmaBufInfo(read_fdrefs=false) with a call
to the underlying ReadDmaBufMapRefs() api which is now made public.

Bug: 181976677
Test: dmabufinfo_test
Change-Id: I9c05f0be9fc4d9cd40cdb146f3f6ca4860f7cd0f
parent 055977a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -902,7 +902,7 @@ static jlong android_os_Debug_getDmabufMappedSizeKb(JNIEnv* env, jobject clazz)
            continue;
        }

        if (!AppendDmaBufInfo(pid, &dmabufs, false)) {
        if (!ReadDmaBufMapRefs(pid, &dmabufs)) {
            LOG(ERROR) << "Failed to read maps for pid " << pid;
        }
    }