Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-XX:[+|-]MergeCompilerOptions

This option enables or disables the merging of multiple -Xjit or -Xaot options into a single -Xjit or -Xaot option.

Syntax

    -XX:[+|-]MergeCompilerOptions
Setting Effect Default
-XX:+MergeCompilerOptions Enable
-XX:-MergeCompilerOptions Disable yes

Explanation

By default, if you specify -Xjit option (or -Xaot option) multiple times, only the last option takes effect. Therefore, on adding an -Xjit option, the resultant behavior might not be as expected, if any instance of this option already exists. It is time-consuming to find the existing instances and try combining them manually so that the system behaves as required.

You can use the -XX:+MergeCompilerOptions option to merge all the existing instances of the -Xjit options logically. To retain the default behavior, whereby only the last option takes effect, you can use the -XX:-MergeCompilerOptions option.

If both -Xjit and -Xaot options exist and you use the -XX:+MergeCompilerOptions option, then multiple -Xjit options are merged into a single -Xjit option and multiple -Xaot options are merged into a single -Xaot option.

Examples

One -Xjit option

java -Xshareclasses:none  -Xjit:version -version

-Xjit option that is applied - version

java -XX:+MergeCompilerOptions -Xshareclasses:none  -Xjit:version -version

-Xjit option that is applied - version

java -XX:-MergeCompilerOptions -Xshareclasses:none  -Xjit:version -version

-Xjit option that is applied - version

Multiple -Xjit options

java -Xshareclasses:none '-Xjit:verbose={compilePerformance},vlog=vlog' -Xjit:version -version

-Xjit option that is applied - version

java -XX:+MergeCompilerOptions -Xshareclasses:none '-Xjit:verbose={compilePerformance},vlog=vlog' -Xjit:version -version

-Xjit options that are applied - verbose={compilePerformance},vlog=vlog,version

java -XX:-MergeCompilerOptions -Xshareclasses:none '-Xjit:verbose={compilePerformance},vlog=vlog' -Xjit:version -version

-Xjit option that is applied - version

Both -XX:+MergeCompilerOptions and -XX:-MergeCompilerOptions

If there are multiple -XX:[+|-]MergeCompilerOptions options with multiple -Xjit options, the last -XX:[+|-]MergeCompilerOptions setting takes effect before the -Xjit options are processed.

java -XX:+MergeCompilerOptions -XX:-MergeCompilerOptions -Xshareclasses:none '-Xjit:verbose={compilePerformance},vlog=vlog' -Xjit:version -version

-Xjit option that is applied - version

java -XX:-MergeCompilerOptions -XX:+MergeCompilerOptions -Xshareclasses:none '-Xjit:verbose={compilePerformance},vlog=vlog' -Xjit:version -version

-Xjit options that are applied - {compilePerformance},vlog=vlog,version

See also