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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user