This chapter describes various logging options available in Oracle JRockit and HotSpot.
Note:
Some of the tools described in this document require a commercial license for use in production. To learn more about commercial features and how to enable them, seehttp://www.oracle.com/technetwork/java/javaseproducts/
.Verbose logging in HotSpot can be turned on using the -verbose
option. There are some specific flags that can be used with this option to get area-specific verbose output.
The following table lists various logging options available in Oracle JRockit and compares them with the options available in HotSpot.
Oracle JRockit Verbose Module | HotSpot Option | Note |
---|---|---|
|
-- |
-- |
|
|
Displays information. |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-verbose:gc |
Displays information about each garbage collection (GC) event. |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
|
-- |
-- |
-- |
|
Displays information about the use of native methods and other Java Native Interface (JNI) activity. |
These are some of the common logging options available in HotSpot that can be used to turn on the diagnostic output for a specific subsystem within the HotSpot JVM.
HotSpot Logging Options | Note |
---|---|
|
Sets the file to which verbose GC event information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The |
|
Sets the path and file name where log data is written. |
|
Enables printing of ergonomically selected JVM flags that appeared on the command line. |
|
Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled |
|
Enables logging of compilation activity to a file named hotspot.log in the current working directory. You can specify a different log file path and name using the |
|
Enables printing of assembly code resulting from JIT compilation of Java bytecode by using the external disassembler.so library. This option enables you to see the generated code, which may help you to diagnose performance issues. This option must be used together with the |
|
Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled. |
|
Enables printing of inlining decisions. This option enables you to see which methods are getting inlined. |
|
Enables printing of a class instance histogram after a Control+C event (SIGTERM). By default, this option is disabled. |
|
Enables printing of java.util.concurrent locks after a Control+C event (SIGTERM). By default, this option is disabled. |
|
Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector. |
|
Enables printing of information about adaptive generation sizing. |
|
Enables printing of messages at every GC. |
|
Enables printing of how much time elapsed since the last pause (for example, a GC pause). |
|
Enables printing of how much time the pause (for example, a GC pause) lasted. |
|
Enables printing of a date stamp at every GC. |
|
Enables printing of detailed messages at every GC. |
|
Enables printing of time stamps for every individual GC worker thread task. |
|
Enables printing of time stamps at every GC. |
|
Prints detailed deduplication statistics. |
|
Enables printing of tenuring age information. |