Java
From wiki.vincentkong.com
Enable verbose garbage collection
Add the JVM argument to the command line
-verbose:gc
Sample output:
[GC 325407K->83000K(776768K), 0.2300771 secs] [GC 325816K->83372K(776768K), 0.2454258 secs] [Full GC 267628K->83769K(776768K), 1.8479984 secs]
For more details use additional arguments -XX:+PrintGCDetails and -XX:+PrintGCTimeStamps (print a time stamp at the start of each collection)
Sample output:
111.042: [GC 111.042: [DefNew: 8128K->8128K(8128K), 0.0000505 secs]111.042: [Tenured: 18154K->2311K(24576K), 0.1290354 secs] 26282K->2311K(32704K), 0.1293306 secs]
Reference: http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html