IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Garbage Collector diagnostic data
Verbose garbage collection logging
Verbose logging is intended as the first tool to be used when attempting to diagnose garbage collector problems; you can perform more detailed analysis by calling one or more -Xtgc (trace garbage collector) traces.
Note: The output provided by -verbose:gc can and does change between releases. Ensure that you are familiar with details of the different collection strategies by reading The collector and the allocator if necessary.
By default, -verbose:gc output is written to stderr. You can redirect the output to a file using the -Xverbosegclog command-line option (see Garbage Collector command-line options for more information).
In this release, the verbose logging function is event-based, generating data for each garbage collection operation, as it happens.
A garbage collection cycle is made up of one or more garbage collection operations, spread across one or more garbage collection increments. A garbage collection cycle can be caused by a number of events, including:
- Calls to System.gc().
- Allocation failures.
- Completing concurrent collections.
- Decisions based on the cost of making resource allocations.
The verbose garbage collection output for each event contains an incrementing ID tag. The ID increments for each event, regardless of event type, so you can use this tag to search within the output for specific events.
The following sections show sample results for different garbage collection events.
- Garbage collection initialization
When garbage collection is initialized, verbose logging generates output showing the garbage collection options in force.- Stop-the-world operations
When an application is stopped so that the garbage collector has exclusive access to the JVM, verbose logging records the event.- Garbage collection cycle
Verbose garbage collection output shows each garbage collection cycle enclosed within <cycle-start> and <cycle-end> tags.- Garbage collection increment
A complete garbage collection increment is shown within <gc-start> and <gc-end> tags in the verbose output.- Garbage collection operation
Every garbage collection increment contains at least one garbage collection operation, shown in the verbose output with a <gc-op> tag.- Allocation failure
Garbage collection cycles caused by an allocation failure are shown by <af-start> and <af-end> tags in the verbose output.
Parent: Garbage Collector diagnostic data
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.