Wednesday, August 30, 2006

Viewing GarbageCollection stats

The command line argument -verbose:gc prints information at every collection.
For example
[GC 325407K->83000K(776768K), 0.2300771 secs]
[GC 325816K->83372K(776768K), 0.2454258 secs]
[Full GC 267628K->83769K(776768K), 1.8479984 secs]
The flag -XX:+PrintGCDetails prints additional information about the collections.
example:
[GC [DefNew: 64575K->959K(64576K), 0.0457646 secs] 196016K->133633K(261184K), 0.0459067 secs]]
here
DefNew: 64575K->959K(64576K) indicates that the minor collection recovered about 98% of the young generation,

The flag -XX:+PrintGCTimeStamps will additionally print a time stamp at the start of each collection.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home