From dd358fedba789f8c6eb978a97654d426cc76baee Mon Sep 17 00:00:00 2001 From: Kirill Shirokov Date: Thu, 26 Mar 2026 22:32:57 -0700 Subject: [PATCH] Add CompileCommand compilation level description to java.md --- src/java.base/share/man/java.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/java.base/share/man/java.md b/src/java.base/share/man/java.md index 18d64b3a4c2..5841fa29082 100644 --- a/src/java.base/share/man/java.md +++ b/src/java.base/share/man/java.md @@ -1800,6 +1800,35 @@ performed by the Java HotSpot VM. You can suppress this by specifying the `-XX:CompileCommand=quiet` option before other `-XX:CompileCommand` options. + Compilation levels can be specified in the `compileonly`, `exclude`, `print`, + and `break` commands using a bitmask as an optional value: + + ``` + -XX:CompileCommand=exclude,java/lang/String.indexOf,11 + -XX:CompileCommand=compileonly,java/lang/String.indexOf,4 + -XX:CompileCommand=print,java/lang/String.indexOf,4 + -XX:CompileCommand=break,java/lang/StringBuffer.append,8 + ``` + + The bitmask is calculated by summing the desired compilation level values: + + `1` + : C1 JIT compiler without profiling. + + `2` + : C1 JIT compiler with limited profiling. + + `4` + : C1 JIT compiler with full profiling. + + `8` + : C2 JIT compiler: no profiling, full optimization. + + If the bitmask is not specified, all levels are assumed. + + Note: Excluding specific compilation levels may disrupt normal state transitions + between the levels, as the VM will not automatically work around the excluded ones. + [`-XX:CompileCommandFile=`]{#-XX_CompileCommandFile}*filename* : Sets the file from which JIT compiler commands are read. By default, the `.hotspot_compiler` file is used to store commands performed by the JIT