Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit


This Oracle HotSpot option prints the code cache memory usage when the application exits. This option is recognized by Eclipse OpenJ9™ and provided for compatibility.


Setting Effect Default
-XX:+PrintCodeCache Enable
-XX:-PrintCodeCache Disable yes

As discussed in the Oracle documentation, the code cache usage can be shown when the application exits, by specifying –XX:+PrintCodeCache on the Java launcher command line. The output looks similar to the following:

CodeCache: size=262144Kb used=454Kb max_used=457Kb free=261690Kb
  • size: The maximum size of the code cache.
  • used: The amount of code cache memory actually in use.
  • max_used: The high water mark for code cache usage.
  • free: size minus used.