| United States-English |
|
|
|
![]() |
Java™ Troubleshooting Guide for HP-UX Systems: > Chapter 1 Diagnostic and Monitoring Tools and Optionsvisualgc |
|
The visualgc tool uses jvmstat technology to provide visualization of garbage collection activity in the Java VM. The Java VM shipped with JDK 1.4.2 and later releases provides the always-on instrumentation needed to support monitoring tools and utilities such as visualgc. As of JDK 1.5+, the following subset of the jvmstat tools is included with the Java VM: jps (formerly jvmps), jstat (formerly jvmstat), and jstatd (formerly perfagent). visualgc is not included in this set, but is instead provided in the unbundled jvmstat 3.0 distribution. The download for jvmstat 3.0 may be found at: http://java.sun.com/performance/jvmstat visualgc attaches to a running Java VM processs to collect and graphically display garbage collection, class loader, and Java compiler performance data. The target Java VM is identified by its virtual machine identifier, or vmid. On HP-UX, the vmid is the process id of the running Java application. For details on visualgc usage refer to: http://java.sun.com/performance/jvmstat/visualgc.html When visualgc is attached to a running Java VM it opens the following screens:
The Survivor Age Histogram screen is only available when Parallel Scavenge is in use (-XX:+UseParallelGC or -XX:+AggressiveHeap options). The following figure shows the visualgc Application Information screen and a description of the different screen areas: The top panel of this screen is labeled Application Information . This panel has an Alive/Dead indicator and the elapsed time since the start of the Java application. Following this panel there is a scrollable text area that lists miscellaneous information about the configuration of the target Java application and the Java VM. This section includes main class or jar file name, the arguments to the class's main method, arguments passed to the Java VM, and the values of certain Java properties exported as instrumentation objects. The bottom panel shows a graphical view of the spaces that make up the generational garbage collection system. This panel is divided into three vertical sections, one for each of the generations: the Perm generation, the Old (or Tenured) generation, and the Young generation. The Young generation is comprised of three separate spaces, the Eden space, and two Survivor spaces, S0 and S1. The screen areas representing the various spaces are sized in proportion to the maximum capacities of the spaces. The screen areas for the three GC generations are of fixed size and do not vary over time. Each space is filled with a unique color indicating the current utilization of the space relative to its maximum capacity. The unique color for each space is used consistently among this screen and the other two visualgc screens (Graph and Survivor Age Histogram). The Graph screen displays the values of various statistics as a function of time. The resolution of the horizontal axis of the graph is determined by the interval command-line argument, where each sample occupies two pixels of screen area. The height of each display depends on the metric being plotted. The following figure is an example of the Graph screen: Each of the GC space graphs can be displayed in one of two modes: reserved mode or committed mode; committed mode is the default. In reserved mode, the data is scaled according to the maximum capacity of the space. The background grid is painted in dark gray to represent the uncommitted portion and in green to represent the committed portion of reserved memory. In committed mode, the data is scaled according to the current capacity of the space. The mode can be toggled by right-clicking over the space and checking or clearing the Show Reserved Space check box. The Survivor Age Histogram screen consist of two panels, the Parameters panel and the Histogram panel. The Parameters panel displays the size of the survivor spaces and the parameters that control the promotion behavior of the young generation. The Histogram panel displays a snapshot of the age distribution of objects in the active survivor space after the last Young generation collection. The screen is comprised of 32 identically sized regions, one for each possible object age. Each region represents 100% of the active Survivor Space and is filled with a colored area that indicates the percentage of the survivor space occupied by objects of the given age. The following figure is an example of the Survivor Age Histogram screen: When the Java VM is started with the Parallel Young GC option (-XX:+UseParallelGC), the Survivor Age Histogram screen is not displayed because the Parallel Young collector does not maintain a survivor age histogram because it applies a different policy for maintaining objects in the survivor spaces. |
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||