dalvikvm gc相关log介绍
2013-02-25 18:40
369 查看
down vote | I was also looking for this information. GC stands for garbage-collector, which collects unused objects during runtime of your app. GC_EXTERNAL_ALLOC: Means that the VM is trying to reduce the amount of memory used collectable objects, to make room for non-collectable objects. GC_FOR_MALLOC: Means that the GC was triggered because there wasn't enough memory left on the heap to perform an allocation. Might be triggered when new objects are being created. GC_CONCURRENT: Triggered when the heap has reached a certain amount of objects to collect. I am guessing that the 38% free means that 38% of the heap is unused. 8772K would be the size of the used memory on the heap and 14087K would be the size of the heap. I don´t know, sorry. Please note that all of this information is based on a post from Robert on a similiar question posted here on stackoverflow. All credit (as long as this is correct) goes to Robert. |
At about 14 minutes into the presentation, he breaks down the message format. (BTW, that video has really good info on debugging memory leaks)
Roughly speaking, the format is
[Reason] [Amount Freed], [Heap Statistics], [External Memory Statistics], [Pause Time]
Reason
Viktor/Robert already explainedGC_CONCURRENT,
GC_FOR_MALLOC,
GC_EXTERNAL_ALLOC.
There is also:
GC_HPROF_DUMP_HEAP- If you dump heap by clicking the "dump heap" button from DDMS or programatically
GC_EXPLICIT- If you call System.gc()
Amount Freed
E.g.freed 2125K
Self explanatory
Heap Statistics
E.g.47% free 6214K/11719K
These numbers reflect conditions after the GC ran. The "47% free" and 6214K reflect the current heap usage. The 11719K represents the total heap size. From what I can tell, the heap can grow/shrink, so you will not necessarily have an OutOfMemoryError if
you hit this limit.
External Memory Statistics
E.gexternal 7142K/8400K
Note: This might only exist in pre-Honeycomb versions of Android (pre 3.0).
Before Honeycomb, bitmaps are allocated external to your VM (e.g. Bitmap.createBitmap() allocates the bitmap externally and only allocates a few dozen bytes on your local heap). Other examples of external allocations are for java.nio.ByteBuffers.
Pause Time
If it's a concurrent GC event, there will be two times listed. One is for a pause before the GC, one is for a pause when the GC is mostly done.E.g.paused 3ms+5ms
For non-concurrent GC events, there is only one pause time and it's typically much bigger.E.g.
paused 87ms
相关文章推荐
- (转)关于XMPP中DDLog相关的简单介绍
- Log打印的:D/dalvikvm(4342): GC_FOR_ALLOC freed
- 【转载】Java垃圾回收内存清理相关(虚拟机书第三章),GC日志的理解,CPU时间、墙钟时间的介绍
- 检查resin的gc相关log的脚本(nagios插件版)-python
- Log打印的:D/dalvikvm(4342): GC_FOR_ALLOC freed
- IntelliJ IDEA 之 HelloWorld 项目创建及相关配置文件介绍
- PHP语言学习路线以及PHP语言相关介绍
- 安卓系统属性值相关介绍
- ifconfig、ss、ip的相关介绍之三ip
- 对主机名进行IP地址解析(相关知识介绍)
- Android内存使用——垃圾回收LOG,GC_CONCURRENT等的意义的说明
- Android中读取中文字符的文件与文件读取相关介绍
- 小程序生成统一支付prepay_id相关配置和类介绍
- convert转换虚拟机注意事项及相关经验介绍
- Linux系统Logrotate服务介绍
- elasticsearch与Lucene相关介绍
- iBATIS入门介绍和SQL的转义字符及mysql 约束相关知识
- JS中的log对象获取以及debug的写法介绍
- 非窗口类中使用定时器的方法及相关知识的介绍
- 高斯金字塔的相关基础知识介绍