Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This includes the current heap size, as well as the number and size of objects collected, number of objects in the heap, amount of time the collector ran and other information.

Sample Verbose GC Output:

GC 4: starting collection, threshold allocation reached.
GC 4: live objects 2562187; collected objects 4936351; collected (KB) 541840.
GC 4: queued for finalization 0; total soft references 92; cleared soft references 5.
GC 4: current heap (KB) 1171424; current threshold (KB) 524288.
GC 4: collect (milliseconds) 4138.
GC 4: current cycle allocation (KB) 236160; previous cycle allocation (KB) 524314.
GC 4: total weak references 684; cleared weak references 0.
GC 4: total final references 11797; cleared final references 63.
GC 4: total phantom references 0; cleared phantom references 0.
GC 4: total old soft references 0; cleared old soft references 0.

The most important of these fields for tuning GC are:

...