5 Logging
Verbose Logging
Verbose logging in HotSpot can be enabled using the -verbose
option. There are some specific flags that can be used with this option to get area-specific verbose output.
Table 5-1 Verbose Logging
Oracle JRockit Verbose Module | HotSpot Option | Notes |
---|---|---|
|
NA |
NA |
|
|
Displays information about the classes that are being loaded. |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
-verbose:gc |
Displays information about each garbage collection (GC) event. |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
NA |
|
Displays information about the use of native methods and other Java Native Interface (JNI) activity. |
HotSpot Logging Options
These are some of the common logging options available in HotSpot that can be used to enable the diagnostic output for a specific subsystem within the HotSpot JVM.
Table 5-2 Logging Options
HotSpot Logging Options | Notes |
---|---|
-Xlog |
Enables the common logging system for all JVM components. |
|
Sets the file to which verbose GC event information must be redirected for logging. The information written to this file is similar to the output of
-verbose:gc with the time elapsed from the first GC event preceding each logged event. The -Xloggc option overrides the -verbose:gc , if both are given with the same java command.
Note: This option was deprecated in JDK 9. |
|
Sets the path and file name where the log data is written. |
|
Enables logging of compilation activity to a file named |
|
Enables printing of the selected JVM flags that appeared on the command-line. |
|
Enables printing of messages at every GC.
Note: This option was deprecated in JDK 9. |
|
Enables printing of detailed messages at every GC.
Note: This option was deprecated in JDK 9. |
|
Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled. |
|
Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled. |
|
Enables printing of assembly code resulting from JIT compilation of Java bytecode by using the external |
|
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 view the methods that 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 |
Table 5-3 GC Logging Options
GC Logging Options | Notes | |
---|---|---|
-Xlog:gc |
Enables printing of messages at every GC. The |
|
|
Enables the printing of information about the regions that are allocated and that are reclaimed by the G1 collector. |
|
|
Enables printing of information about adaptive generation sizing. |
|
|
Enables printing of the time elapsed from the last pause (for example, a GC pause). |
|
|
Enables printing of time stamps for every individual GC worker thread task. |
|
|
Enables printing of time stamps at every GC using the decorators |
|
|
Prints detailed deduplication statistics. |
|
|
Enables printing of tenuring age information. |
|
|
Enables printing of detailed messages at every GC. |
|
|
Logs messages with the |