HPjtune analyzes instrumentation data emitted by the HotSpot JVM Garbage Collector. The data are written to ASCII text files by the JVM when requested with Java command line options. You then open the data collection files in HPjtune for analysis.
-Xverbosegc
option.
-Xloggc
.
-XX:+PrintTLE
(Note that -XX:+PrintTLE
is not supported in version 5.0).
Remember that the above requirements apply to the system where you run the Java application being measured, not where you run HPjtune.
HPjtune processes three different data collection file types, which you obtain by running your Java application with either of the following options:
-Xverbosegc
(produces detailed
information about the performance of the individual garbage collector arenas
for the entire Java application)
-Xverbosegc:file=
gcfilename
-Xloggc
(produces general
information about the performance of the garbage collector for the entire Java
application)
-Xloggc:
gcfilename
-XX:+PrintTLE
(produces
information about the performance of the thread-local eden area of the heap)
-XX:+PrintTLE
java -XX:+PrintTLE -jar myapp.jar > tledata.txt
grep -e "TLE " tledata.txt > data.tle
grep -e " TLAB: " tledata.txt > data.tle
Examples
java -Xverbosegc:file=test01gc.vgc -jar myapp.jar
Runs the java
program in the Java archive file myapp.jar
and writes
GC data to the file test01gc.vgc
.
java -Xloggc:myapp.lgc -XX:+PrintTLE -jar myapp.jar | grep -e " TLAB: " >myapp.tle
Runs the same java program, this time redirecting STDOUT to the pipe for
filtering and writing to file myapp.tle
.
At the same time the GC log is written to file myapp.lgc
.
You present GC and TLE data capture files to HPjtune either with the
File -> Open menu selection or
the toolbar
button.
HPjtune recognizes the file type based on content, so there is no special open command
for GC or TLE data.
There is also no dependency on file name
extensions to identify a file as containing GC or TLE data.