Rename getIonMappedSizeKb to getDmabufMappedSizeKb am: 6ae0be89b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1576749 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I892f92e8fa37d0f71f679c633b59b5c9523547ff
This commit is contained in:
@@ -2567,13 +2567,13 @@ public final class Debug
|
||||
public static native long getIonPoolsSizeKb();
|
||||
|
||||
/**
|
||||
* Return ION memory mapped by processes in kB.
|
||||
* Return DMA-BUF memory mapped by processes in kB.
|
||||
* Notes:
|
||||
* * Warning: Might impact performance as it reads /proc/<pid>/maps files for each process.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native long getIonMappedSizeKb();
|
||||
public static native long getDmabufMappedSizeKb();
|
||||
|
||||
/**
|
||||
* Return memory size in kilobytes used by GPU.
|
||||
|
||||
@@ -813,8 +813,8 @@ static jlong android_os_Debug_getIonPoolsSizeKb(JNIEnv* env, jobject clazz) {
|
||||
return poolsSizeKb;
|
||||
}
|
||||
|
||||
static jlong android_os_Debug_getIonMappedSizeKb(JNIEnv* env, jobject clazz) {
|
||||
jlong ionPss = 0;
|
||||
static jlong android_os_Debug_getDmabufMappedSizeKb(JNIEnv* env, jobject clazz) {
|
||||
jlong dmabufPss = 0;
|
||||
std::vector<dmabufinfo::DmaBuffer> dmabufs;
|
||||
|
||||
std::unique_ptr<DIR, int (*)(DIR*)> dir(opendir("/proc"), closedir);
|
||||
@@ -838,10 +838,10 @@ static jlong android_os_Debug_getIonMappedSizeKb(JNIEnv* env, jobject clazz) {
|
||||
}
|
||||
|
||||
for (const dmabufinfo::DmaBuffer& buf : dmabufs) {
|
||||
ionPss += buf.size() / 1024;
|
||||
dmabufPss += buf.size() / 1024;
|
||||
}
|
||||
|
||||
return ionPss;
|
||||
return dmabufPss;
|
||||
}
|
||||
|
||||
static jlong android_os_Debug_getGpuTotalUsageKb(JNIEnv* env, jobject clazz) {
|
||||
@@ -921,8 +921,8 @@ static const JNINativeMethod gMethods[] = {
|
||||
(void*)android_os_Debug_getIonHeapsSizeKb },
|
||||
{ "getIonPoolsSizeKb", "()J",
|
||||
(void*)android_os_Debug_getIonPoolsSizeKb },
|
||||
{ "getIonMappedSizeKb", "()J",
|
||||
(void*)android_os_Debug_getIonMappedSizeKb },
|
||||
{ "getDmabufMappedSizeKb", "()J",
|
||||
(void*)android_os_Debug_getDmabufMappedSizeKb },
|
||||
{ "getGpuTotalUsageKb", "()J",
|
||||
(void*)android_os_Debug_getGpuTotalUsageKb },
|
||||
{ "isVmapStack", "()Z",
|
||||
|
||||
@@ -13721,7 +13721,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
final long ionHeap = Debug.getIonHeapsSizeKb();
|
||||
final long ionPool = Debug.getIonPoolsSizeKb();
|
||||
if (ionHeap >= 0 && ionPool >= 0) {
|
||||
final long ionMapped = Debug.getIonMappedSizeKb();
|
||||
final long ionMapped = Debug.getDmabufMappedSizeKb();
|
||||
final long ionUnmapped = ionHeap - ionMapped;
|
||||
pw.print(" ION: ");
|
||||
pw.print(stringifyKBSize(ionHeap + ionPool));
|
||||
@@ -14539,7 +14539,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
final long ionHeap = Debug.getIonHeapsSizeKb();
|
||||
final long ionPool = Debug.getIonPoolsSizeKb();
|
||||
if (ionHeap >= 0 && ionPool >= 0) {
|
||||
final long ionMapped = Debug.getIonMappedSizeKb();
|
||||
final long ionMapped = Debug.getDmabufMappedSizeKb();
|
||||
final long ionUnmapped = ionHeap - ionMapped;
|
||||
memInfoBuilder.append(" ION: ");
|
||||
memInfoBuilder.append(stringifyKBSize(ionHeap + ionPool));
|
||||
|
||||
Reference in New Issue
Block a user