GC action的定义

来源:互联网 发布:淘宝在哪里贷款 编辑:程序博客网 时间:2024/05/16 09:39

 http://www.ibm.com/developerworks/ibm/library/i-garbage3.html


[1] Performing a GC without using the wilderness. It is designed to avoid compactions by keeping the wilderness available for a large allocation request.

[2] Tried to allocate out of the wilderness and failed.

[3] Attempting to expand the heap.

[4] Clearing any remaining soft references. This is only done if there is less than 12% free space in a fully expanded heap.

[5] Trying to steal some space from the transient heap. Only applies to resettable mode.

[6] Not actually an action. It gives a verbosegc message that we are very low on heap space, or totally out of heap space

 

 

IBM JDK
–-verbose:gc-Xverbosegclog:<path_GC_log_file_name>
HP JDK
–-Xverbosegc[:help]|[0|1][:file=[stdout|stderr|<filename>]] -Xloggc
Sun JDKBEA JRockit
–-verbose:gc–Xloggc:logfile
BEA JRockit
–-verbose:gc-Xverboselog:logfile

 


To get detailed GC info
–-XX:-PrintGC
–-XX:+PrintGCDetails
–-XX:+PrintGCApplicationConcurrentTime
–-XX:+PrintGCApplicationStoppedTime
–-XX:+PrintGCTimeStamps