diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-12-08 16:20:26 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-12-08 16:38:20 -0800 |
commit | 25c5e2b12d5d5d06739e3f70a0da968d97935b46 (patch) | |
tree | 109798ab1ac0f37ec39719201f3fbd0cdc184bef | |
parent | fbba9b57a35da49e592756ef86f98535280c0d09 (diff) | |
download | frameworks_base-25c5e2b12d5d5d06739e3f70a0da968d97935b46.zip frameworks_base-25c5e2b12d5d5d06739e3f70a0da968d97935b46.tar.gz frameworks_base-25c5e2b12d5d5d06739e3f70a0da968d97935b46.tar.bz2 |
Add more -d dalvik details to dumpsys
Added .NonMoving for the non moving space.
Added .Zygote for the zygote.
Added .IndirectRef for indirect reference tables (jobjects).
Example:
Dalvik Details
.Heap 2264 2264 0 0
.LOS 80 80 0 0
.GC 144 144 0 0
.Zygote 331 196 0 2428
.NonMoving 540 540 0 0
.IndirectRef 20 20 0 0
Bug: 18672069
Change-Id: Id14e5bc92ceb15fe7a17d9fb035f18aa2925e50c
-rw-r--r-- | core/java/android/os/Debug.java | 5 | ||||
-rw-r--r-- | core/jni/android_os_Debug.cpp | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index 3f42d25..7eb606a 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -168,7 +168,7 @@ public final class Debug public static final int NUM_OTHER_STATS = 17; /** @hide */ - public static final int NUM_DVK_STATS = 5; + public static final int NUM_DVK_STATS = 8; /** @hide */ public static final int NUM_CATEGORIES = 7; @@ -314,6 +314,9 @@ public final class Debug case 19: return ".LinearAlloc"; case 20: return ".GC"; case 21: return ".JITCache"; + case 22: return ".Zygote"; + case 23: return ".NonMoving"; + case 24: return ".IndirectRef"; default: return "????"; } } diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index e572d22..91daee8 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -70,6 +70,9 @@ enum { HEAP_DALVIK_LINEARALLOC, HEAP_DALVIK_ACCOUNTING, HEAP_DALVIK_CODE_CACHE, + HEAP_DALVIK_ZYGOTE, + HEAP_DALVIK_NON_MOVING, + HEAP_DALVIK_INDIRECT_REFERENCE_TABLE, _NUM_HEAP, _NUM_EXCLUSIVE_HEAP = HEAP_OTHER_MEMTRACK+1, @@ -274,15 +277,21 @@ static void read_mapinfo(FILE *fp, stats_t* stats) if (strstr(name, "/dev/ashmem/dalvik-LinearAlloc") == name) { subHeap = HEAP_DALVIK_LINEARALLOC; } else if ((strstr(name, "/dev/ashmem/dalvik-alloc space") == name) || - (strstr(name, "/dev/ashmem/dalvik-main space") == name) || - (strstr(name, "/dev/ashmem/dalvik-zygote space") == name) || - (strstr(name, "/dev/ashmem/dalvik-non moving space") == name)) { + (strstr(name, "/dev/ashmem/dalvik-main space") == name)) { // This is the regular Dalvik heap. whichHeap = HEAP_DALVIK; subHeap = HEAP_DALVIK_NORMAL; } else if (strstr(name, "/dev/ashmem/dalvik-large object space") == name) { whichHeap = HEAP_DALVIK; subHeap = HEAP_DALVIK_LARGE; + } else if (strstr(name, "/dev/ashmem/dalvik-non moving space") == name) { + whichHeap = HEAP_DALVIK; + subHeap = HEAP_DALVIK_NON_MOVING; + } else if (strstr(name, "/dev/ashmem/dalvik-zygote space") == name) { + whichHeap = HEAP_DALVIK; + subHeap = HEAP_DALVIK_ZYGOTE; + } else if (strstr(name, "/dev/ashmem/dalvik-indirect ref") == name) { + subHeap = HEAP_DALVIK_INDIRECT_REFERENCE_TABLE; } else if (strstr(name, "/dev/ashmem/dalvik-jit-code-cache") == name) { subHeap = HEAP_DALVIK_CODE_CACHE; } else { |