|
-XX:-PrintGC |
Disabled by default |
Enable GC log printing.
For example:
[Full GC 131115 K-> 7482 K (1015808 K), 0.1633180 secs]
This option can be dynamically enabled through com. sun. management. HotSpotDiagnosticMXBean API and Jconsole.
For details, see
Http://java.sun.com/developer/technicalArticles/J2SE/monitoring/#Heap_Dump |
|
-XX:-PrintGCDetails |
Introduced in 1.4.0, disabled by default |
Print GC recovery details.
For example:
[Full GC (system) [tenured: 0 k-> 2394 K (466048 K), 0.0624140 secs] 30822 K-> 2394 K (518464 K), [perm: 10443 K-> 10443 K (16384 K)], 0.0625410 secs] [times: User = 0.05 sys = 0.01, real = 0.06 secs]
This option can be dynamically enabled through COM. Sun. Management. hotspotdiagnosticmxbean API and jconsole.
For details, see
Http://java.sun.com/developer/technicalArticles/J2SE/monitoring/#Heap_Dump |
|
-XX:-printgctimestamps |
Disabled by default |
Print GC pause time.
For example:
2.744: [Full GC (system) 2.744: [tenured: 0 k-> 2441 K (466048 K), 0.0598400 secs] 31754 K-> 2441 K (518464 K), [perm: 10717 K-> 10717 K (16384 K)], 0.0599570 secs] [times: User = 0.06 sys = 0.00, real = 0.06
Secs]
This option can be dynamically enabled through COM. Sun. Management. hotspotdiagnosticmxbean API and jconsole.
For details, see
Http://java.sun.com/developer/technicalArticles/J2SE/monitoring |
The minor collection output for these options produce output of the form
[GC [<collector >:< starting occupancy1>-> <ending occupancy1>, <pause time1> secs] <starting occupancy3>-> <ending occupancy3>, <pause time3> secs]
Where
<Collector> is an internal name for the collector used in the minor collection
<Starting occupancy1> is the occupancy of the young generation before the collection
<Ending occupancy1> is the occupancy of the young generation after the collection
<Pause time1> is the pause time in seconds for the minor collection.
<Starting occupancy3> is the occupancy of the entire heap before the collection
<Ending occupancy3> is the occupancy of the entire heap after the collection
<Pause time3> is the pause time for the entire garbage collection. This wocould include the time for a major collection is one was done.
(1) Java SE 6 HotSpot [tm] Virtual Machine Garbage Collection Tuning
(2) Diagnosing a Garbage Collection problem