7.7.3 -XX:[+|-]PrintCodeCacheInfo
-XX:[+|-]PrintCodeCacheInfo specifies whether the usage rate of the code cache area is to be output. In addition, this option specifies whether the message indicating that usage has reached the threshold value is to be output to the Java VM log file.
Description
-XX:[+|-]PrintCodeCacheInfo specifies whether the usage rate of the code cache area is to be output. In addition, this option specifies whether the message indicating that usage has reached the threshold value is to be output to the Java VM log file. The code cache area stores the JIT compile codes generated by JIT compilation. By using JIT compilation to execute Java methods that have a large number of calls or loops, processing is accelerated.
If this option is enabled, the usage rate of the code cache area is output to the extended verbosegc information. In addition, when the usage rate of the code cache area reaches the threshold value, a message is output.
The threshold value is calculated as follows: maximum_size_of_code_cache_area * value_of_-XX:CodeCacheInfoPrintRatio_option / 100. Specify the maximum size of the code cache area in the -XX:ReservedCodeCacheSize option.
Even if the -XX:-HitachiVerboseGC option is specified, the usage rate of the code cache area is output to the extended verbosegc information that is output by the -v and -s options of the javagc command.
- Prerequisite option
-
-
-XX:+HitachiVerboseGC
-
- Related options
-
-
-XX:+HitachiCommaVerboseGC
-
-XX:CodeCacheInfoPrintRatio
-
- Output format
-
The following shows the output format of the usage rate of the code cache area.
[id] <date> (Skip Full:full_count, Copy:copy_count) [gc_kind gc_info, gc_time secs][Eden: eden_info][Survivor: survivor_info] [Tenured: tenured_info][Metaspace: metaspace_info] [class space: class_space_info] [cause:cause_info] [User: user_cpu secs] [Sys: system_cpu secs][IM: jvm_alloc_size, mmap_total_size, malloc_total_size] [TC: thread_count][DOE: doe_alloc_size, called_count] [CCI: cc_used_sizeK, cc_max_sizeK, cc_infoK]
The following provides details about the output items and content when this option is specified.
Output item
Output content
cc_used_size
Size of the used code cache area when GC occurred. This information is output in units of kilobytes.
cc_max_size
Maximum size of the code cache area. This information is output in units of kilobytes.
cc_info
Maintenance information
The following shows the output format of the message indicating that usage has reached the threshold value.
[cc_id]<cc_date>CodeCache usage has exceeded the threshold. [cc_used_sizeK, cc_max_sizeK, cc_infoK]
The following provides details about the output content of the error message.
Output item
Output content
cc_id
CCI (Java VM log file identifier)
cc_date
Date and time when JIT compilation was performed
cc_used_size
Size of the used code cache area after JIT compilation. This information is output in units of kilobytes.
cc_max_size
Maximum size of the code cache area. This information is output in units of kilobytes.
cc_info
Maintenance information
Syntax
-XX:[+|-]PrintCodeCacheInfo
Specifiable values
Type: String
- -XX:+PrintCodeCacheInfo
-
Outputs the usage rate of the code cache area.
The message indicating that usage has reached the threshold value is also output.
- -XX:-PrintCodeCacheInfo
-
Does not output the usage rate of the code cache area.
The message indicating that usage has reached the threshold value is also not output.
Examples
The following shows output examples of the usage rate of the code cache area.
- Example 1 (if SerialGC is selected when the -XX:+HitachiVerboseGC option is selected)
-
[VGC]<Thu Oct 02 10:38:53.658 2014>(Skip Full:1,Copy:0) [Full GC 770K->682K(8064K), 0.0050003 secs][DefNew::Eden: 88K->0K(2304K)] [DefNew::Survivor: 0K->0K(256K)][Tenured: 681K->682K(5504K)] [Metaspace: 3634K(4492K, 4492K)->3634K(4492K, 4492K)] [class space: 356K(388K, 388K)->356K(388K, 388K)] [cause:System.gc][User: 0.0000000 secs][Sys: 0.0000000 secs] [IM: 11944K, 12448K, 0K][TC: 22][DOE: 0K, 0][CCI: 1173K, 245760K, 2496K]
- Example 2 (if G1GC is selected when the -XX:+HitachiVerboseGC option is selected)
-
-
GC-related log
[VG1]<Thu Oct 02 10:38:56.193 2014> [Full GC 753K/2048K(8192K)->678K/1024K(8192K), 0.0097901 secs][Status:-] [G1GC::Eden: 1024K(2048K)->0K(2048K)][G1GC::Survivor: 0K->0K] [G1GC::Tenured: 1024K->1024K][G1GC::Humongous: 0K->0K] [G1GC::Free: 6144K->7168K] [Metaspace: 3634K(4492K, 4492K)->3634K(4492K, 4492K)] [class space: 356K(388K, 388K)->356K(388K, 388K)] [cause:System.gc] [RegionSize: 1024K][Target: 0.2000000 secs][Predicted: 0.0000000 secs] [TargetTenured: 0K][Reclaimable: 0K(0.00%)][User: 0.0000000 secs] [Sys: 0.0000000 secs][IM: 20459K, 21920K, 0K][TC: 35][DOE: 0K, 0] [CCI: 1172K, 245760K, 2496K]
-
Concurrent Marking related log
[VCM]<Wed Jul 24 11:45:20 2013>[Concurrent Root Region Scan Start] [User: 0.0000000 secs][Sys: 0.0000000 secs] [VCM]<Wed Jul 24 11:45:20 2013>[Concurrent Root Region Scan End] [User: 0.0126134 secs][Sys: 0.0146961 secs] [VCM]<Wed Jul 24 11:45:20 2013>[Concurrent Mark Start][User: 0.0000000 secs] [Sys: 0.0000000 secs] [VCM]<Wed Jul 24 11:45:34 2013>[Concurrent Mark End][User: 0.0156250 secs] [Sys: 0.2495800 secs]
-
- Example 3 (if SerialGC is selected when the -XX:+HitachiCommaVerboseGC option is selected)
-
VGC,Thu Oct 02 10:38:52.442 2014,1,0,0,Full GC,770,682,8064,0.0040002,88,0,2304, 0,0,256,681,682,5504,3634,3634,4492,3634,3634,4492,356,356,388,356,356,388,1,0. 0000000,0.0000000,11913,12448,0,22,0,0,1173,245760,2496
- Example 4 (if G1GC is selected when the -XX:+HitachiCommaVerboseGC option is selected)
-
-
GC-related log
VG1,Thu Oct 02 10:38:54.920 2014,Full GC,753,2048,8192,678,1024,8192,0.0064767, -,1024,2048,0,2048,0,0,1024,1024,0,0,6144,7168,3634,3634,4492,3634,3634,4492, 356,356,388,356,356,388,1,1024,0.2000000,0.0000000,0,0,0.00,0.0000000, 0.0000000,20459,21920,0,35,0,0,1171,245760,2496
-
Concurrent Marking related log
VCM,Fri Jul 26 21:35:50 2013,Concurrent Mark Start,0.0000000,0.0000000 VCM,Fri Jul 26 21:35:50 2013,Concurrent Mark End,0.0124532,0.0245698
-
The following shows an example of the output message indicating that usage has reached the threshold value.
- Example
-
[CCI]<Wed Dec 26 14:27:53 2012>CodeCache usage has exceeded the threshold. [39358K, 49152K, 39360K]
Notes
-
If the usage of the code cache area remains around the threshold value, no message is output even if a Java method is compiled by JIT.
After the usage of the code cache area drops to less than the threshold value, if the usage reaches the threshold value again when a Java method is compiled by JIT, a message is output.
-
The size of code cache area used by the system is a maximum of 500 kilobytes in a 32-bit system and a maximum of 2 megabytes in a 64-bit system. Therefore, depending on the size of code cache area used by the system, the code cache area might become insufficient even if the size of used code cache area does not reach the maximum.
If a large value is specified for the usage threshold, the code cache area might become insufficient before a message is output. If you want to output a message before the code cache area becomes insufficient, specify a value for -XX:CodeCacheInfoPrintRatio (the option for specifying the usage of the code cache area) so that the value calculated by the formula maximum_size_of_code_cache_area - threshold value is 4 megabytes or more.