From 66d2190ed6bdc6533f48ba4256b200555b9b3031 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Fri, 5 Mar 2021 21:12:43 -0500 Subject: [PATCH] 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 --- core/jni/android_os_Debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 0e3db46bd0c99..f379ba0ddebbb 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -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; } }