7.7.1 -XX:CodeCacheInfoPrintRatio
-XX:CodeCacheInfoPrintRatio specifies the usage rate of the code cache area. This is the rate at which a message is output to indicate that usage has reached the threshold value.
Description
-XX:CodeCacheInfoPrintRatio specifies the usage rate of the code cache area. This is the rate at which a message is output to indicate that usage has reached the threshold value.
The threshold value is calculated by using the following formula based on the usage rate specified in this option:
maximum_size_of_code_cache_area * value_of_-XX:CodeCacheInfoPrintRatio_option / 100
The code cache area is the area that stores the JIT compile code generated by JIT compilation. By using JIT compilation to execute Java methods that have a large number of calls or loops, Java VM accelerates the execution processing.
The maximum size of the code cache area is specified in the ReservedCodeCacheSize option. Specify a value equal to or larger than the default value of the ReservedCodeCacheSize option.
In addition, consider extending the code cache area when the code cache area is depleted or if there is a risk of depletion. It is not possible to estimate or calculate the size of the JIT compile code. For this reason, measure the actual amount of space used by the code cache area in the Java application execution environment. After considering the amount of space used by the code cache area used by the system (a maximum of 500 kilobytes in the 32-bits version, and 2 megabytes in the 64-bits version), estimate the maximum size of the code cache area.
- Prerequisite option
-
-
-XX:+PrintCodeCacheInfo
-
Syntax
-XX:CodeCacheInfoPrintRatio=integer_value
Specifiable values
- integer_value
-
Type: Integer
Specify an integer from 0 to 100 (unit: %). If the specified value is outside of the specifiable range, 80 is set.
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.