http://infinitesproutingthoughts.wordpress.com/2013/06/21/deciphering-android-garbage-collection-gc-logs/
19:30:22.188 26517 26519 D dalvikvm: GC_CONCURRENT freed 82K, 7% free 7524K/8035K, paused 12ms+25ms, total 82ms
GC_CONCURRENT = all the dalvik VM ‘s thread are being garbage collected.
Freed = 82K, this cycle of Garbage collection freed 82KilloBytes .
7% free = Free % of total Java heap(not including native).
7524K/8035K = allocated / total heap.
That is as per above log: with this GC cycle android VM, freed 82K memory and now total memory foot-print of Java heap is 8035K, out of that 7524K is allocated and rest (7%) is free.
Tip: To find the Java Heap usage for a particular java process(app/service/content provider).i.e(any process forked from Zygote) use below command:
# adb shell ps | grep -i ”andriod_process_name”
# adb logcat | grep “above_returned_process_id” | grep ”GC_”
Ex: #adb shell ps | grep -i “com.android.chrome” (say PID = 2345)
#adb shell ps | grep 2345 | grep ”GC-”
This should display above explained GC logs, whenever there is GC allocation (GC_cocurrent, GC_alloc, ..etc).
This would be handy and efficient then using “adb shell dumpysys meminfo PID”, as the dumpsys runs in process itself, hence making it bit slow.
More often android adb log dumps below text for GC:
19:30:22.188 26517 26519 D dalvikvm: GC_CONCURRENT freed 82K, 7% free 7524K/8035K, paused 12ms+25ms, total 82ms
GC_CONCURRENT = all the dalvik VM ‘s thread are being garbage collected.
Freed = 82K, this cycle of Garbage collection freed 82KilloBytes .
7% free = Free % of total Java heap(not including native).
7524K/8035K = allocated / total heap.
That is as per above log: with this GC cycle android VM, freed 82K memory and now total memory foot-print of Java heap is 8035K, out of that 7524K is allocated and rest (7%) is free.
Tip: To find the Java Heap usage for a particular java process(app/service/content provider).i.e(any process forked from Zygote) use below command:
# adb shell ps | grep -i ”andriod_process_name”
# adb logcat | grep “above_returned_process_id” | grep ”GC_”
Ex: #adb shell ps | grep -i “com.android.chrome” (say PID = 2345)
#adb shell ps | grep 2345 | grep ”GC-”
This should display above explained GC logs, whenever there is GC allocation (GC_cocurrent, GC_alloc, ..etc).
This would be handy and efficient then using “adb shell dumpysys meminfo PID”, as the dumpsys runs in process itself, hence making it bit slow.