src/java.base/share/man/java.1
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 55080 ef713640430e
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 '\" t
     1 .\"t
     2 .\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
     2 .\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
     3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 .\"
     4 .\"
     5 .\" This code is free software; you can redistribute it and/or modify it
     5 .\" This code is free software; you can redistribute it and/or modify it
     6 .\" under the terms of the GNU General Public License version 2 only, as
     6 .\" under the terms of the GNU General Public License version 2 only, as
    18 .\"
    18 .\"
    19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20 .\" or visit www.oracle.com if you need additional information or have any
    20 .\" or visit www.oracle.com if you need additional information or have any
    21 .\" questions.
    21 .\" questions.
    22 .\"
    22 .\"
    23 .\" Title: java
    23 .\" Automatically generated by Pandoc 2.3.1
    24 .\" Language: English
       
    25 .\" Date: 03 March 2015
       
    26 .\" SectDesc: Basic Tools
       
    27 .\" Software: JDK 8
       
    28 .\" Arch: generic
       
    29 .\" Part Number: E38207-04
       
    30 .\" Doc ID: JSSON
       
    31 .\"
    24 .\"
    32 .if n .pl 99999
    25 .TH "JAVA" "1" "2019" "JDK 13" "JDK Commands"
    33 .TH "java" "1" "03 March 2015" "JDK 8" "Basic Tools"
    26 .hy
    34 .\" -----------------------------------------------------------------
    27 .SH NAME
    35 .\" * Define some portability stuff
    28 .PP
    36 .\" -----------------------------------------------------------------
    29 java \- launch a Java application
    37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    30 .SH SYNOPSIS
    38 .\" http://bugs.debian.org/507673
    31 .PP
    39 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
    32 To launch a class file:
    40 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    33 .PP
    41 .ie \n(.g .ds Aq \(aq
    34 \f[CB]java\f[R] [\f[I]options\f[R]] \f[I]mainclass\f[R] [\f[I]args\f[R] ...]
    42 .el       .ds Aq '
    35 .PP
    43 .\" -----------------------------------------------------------------
    36 To launch the main class in a JAR file:
    44 .\" * set default formatting
    37 .PP
    45 .\" -----------------------------------------------------------------
    38 \f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-jar\f[R] \f[I]jarfile\f[R]
    46 .\" disable hyphenation
    39 [\f[I]args\f[R] ...]
    47 .nh
    40 .PP
    48 .\" disable justification (adjust text to left margin only)
    41 To launch the main class in a module:
    49 .ad l
    42 .PP
    50 .\" -----------------------------------------------------------------
    43 \f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-m\f[R]
    51 .\" * MAIN CONTENT STARTS HERE *
    44 \f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...]
    52 .\" -----------------------------------------------------------------
    45 .PP
    53 .SH "NAME"
    46 or
    54 java \- Launches a Java application\&.
    47 .PP
    55 .SH "SYNOPSIS"
    48 \f[CB]java\f[R] [\f[I]options\f[R]] \f[CB]\-\-module\f[R]
    56 .sp
    49 \f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...]
    57 .if n \{\
    50 .PP
    58 .RS 4
    51 To launch a single source\-file program:
    59 .\}
    52 .PP
       
    53 \f[CB]java\f[R] [\f[I]options\f[R]] \f[I]source\-file\f[R] [\f[I]args\f[R]
       
    54 \&...]
       
    55 .TP
       
    56 .B \f[I]options\f[R]
       
    57 Optional: Specifies command\-line options separated by spaces.
       
    58 See \f[B]Overview of Java Options\f[R] for a description of available
       
    59 options.
       
    60 .RS
       
    61 .RE
       
    62 .TP
       
    63 .B \f[I]mainclass\f[R]
       
    64 Specifies the name of the class to be launched.
       
    65 Command\-line entries following \f[CB]classname\f[R] are the arguments for
       
    66 the main method.
       
    67 .RS
       
    68 .RE
       
    69 .TP
       
    70 .B \f[CB]\-jar\f[R] \f[I]jarfile\f[R]
       
    71 Executes a program encapsulated in a JAR file.
       
    72 The \f[I]jarfile\f[R] argument is the name of a JAR file with a manifest
       
    73 that contains a line in the form \f[CB]Main\-Class:\f[R]\f[I]classname\f[R]
       
    74 that defines the class with the
       
    75 \f[CB]public\ static\ void\ main(String[]\ args)\f[R] method that serves
       
    76 as your application\[aq]s starting point.
       
    77 When you use \f[CB]\-jar\f[R], the specified JAR file is the source of all
       
    78 user classes, and other class path settings are ignored.
       
    79 If you\[aq]re using JAR files, then see \f[B]jar\f[R].
       
    80 .RS
       
    81 .RE
       
    82 .TP
       
    83 .B \f[CB]\-m\f[R] or \f[CB]\-\-module\f[R] \f[I]module\f[R][\f[CB]/\f[R]\f[I]mainclass\f[R]]
       
    84 Executes the main class in a module specified by \f[I]mainclass\f[R] if
       
    85 it is given, or, if it is not given, the value in the \f[I]module\f[R].
       
    86 In other words, \f[I]mainclass\f[R] can be used when it is not specified
       
    87 by the module, or to override the value when it is specified.
       
    88 .RS
       
    89 .PP
       
    90 See \f[B]Standard Options for Java\f[R].
       
    91 .RE
       
    92 .TP
       
    93 .B \f[I]source\-file\f[R]
       
    94 Only used to launch a single source\-file program.
       
    95 Specifies the source file that contains the main class when using
       
    96 source\-file mode.
       
    97 See \f[B]Using Source\-File Mode to Launch Single\-File Source\-Code
       
    98 Programs\f[R]
       
    99 .RS
       
   100 .RE
       
   101 .TP
       
   102 .B \f[I]args\f[R] ...
       
   103 Optional: Arguments following \f[I]mainclass\f[R], \f[I]source\-file\f[R],
       
   104 \f[CB]\-jar\f[R] \f[I]jarfile\f[R], and \f[CB]\-m\f[R] or \f[CB]\-\-module\f[R]
       
   105 \f[I]module\f[R]\f[CB]/\f[R]\f[I]mainclass\f[R] are passed as arguments to
       
   106 the main class.
       
   107 .RS
       
   108 .RE
       
   109 .SH DESCRIPTION
       
   110 .PP
       
   111 The \f[CB]java\f[R] command starts a Java application.
       
   112 It does this by starting the Java Virtual Machine (JVM), loading the
       
   113 specified class, and calling that class\[aq]s \f[CB]main()\f[R] method.
       
   114 The method must be declared \f[CB]public\f[R] and \f[CB]static\f[R], it must
       
   115 not return any value, and it must accept a \f[CB]String\f[R] array as a
       
   116 parameter.
       
   117 The method declaration has the following form:
       
   118 .RS
       
   119 .PP
       
   120 \f[CB]public\ static\ void\ main(String[]\ args)\f[R]
       
   121 .RE
       
   122 .PP
       
   123 In source\-file mode, the \f[CB]java\f[R] command can launch a class
       
   124 declared in a source file.
       
   125 See \f[B]Using Source\-File Mode to Launch Single\-File Source\-Code
       
   126 Programs\f[R] for a description of using the source\-file mode.
       
   127 .RS
       
   128 .PP
       
   129 \f[B]Note:\f[R] You can use the \f[CB]JDK_JAVA_OPTIONS\f[R] launcher
       
   130 environment variable to prepend its content to the actual command line
       
   131 of the \f[CB]java\f[R] launcher.
       
   132 See \f[B]Using the JDK_JAVA_OPTIONS Launcher Environment Variable\f[R].
       
   133 .RE
       
   134 .PP
       
   135 By default, the first argument that isn\[aq]t an option of the
       
   136 \f[CB]java\f[R] command is the fully qualified name of the class to be
       
   137 called.
       
   138 If \f[CB]\-jar\f[R] is specified, then its argument is the name of the JAR
       
   139 file containing class and resource files for the application.
       
   140 The startup class must be indicated by the \f[CB]Main\-Class\f[R] manifest
       
   141 header in its manifest file.
       
   142 .PP
       
   143 Arguments after the class file name or the JAR file name are passed to
       
   144 the \f[CB]main()\f[R] method.
       
   145 .SS \f[CB]javaw\f[R]
       
   146 .PP
       
   147 \f[B]Windows:\f[R] The \f[CB]javaw\f[R] command is identical to
       
   148 \f[CB]java\f[R], except that with \f[CB]javaw\f[R] there\[aq]s no associated
       
   149 console window.
       
   150 Use \f[CB]javaw\f[R] when you don\[aq]t want a command prompt window to
       
   151 appear.
       
   152 The \f[CB]javaw\f[R] launcher will, however, display a dialog box with
       
   153 error information if a launch fails.
       
   154 .SH USING SOURCE\-FILE MODE TO LAUNCH SINGLE\-FILE SOURCE\-CODE PROGRAMS
       
   155 .PP
       
   156 To launch a class declared in a source file, run the \f[CB]java\f[R]
       
   157 launcher in source\-file mode.
       
   158 Entering source\-file mode is determined by two items on the
       
   159 \f[CB]java\f[R] command line:
       
   160 .IP \[bu] 2
       
   161 The first item on the command line that is not an option or part of an
       
   162 option.
       
   163 In other words, the item in the command line that would otherwise be the
       
   164 main class name.
       
   165 .IP \[bu] 2
       
   166 The \f[CB]\-\-source\f[R] \f[I]version\f[R] option, if present.
       
   167 .PP
       
   168 If the class identifies an existing file that has a \f[CB]\&.java\f[R]
       
   169 extension, or if the \f[CB]\-\-source\f[R] option is specified, then
       
   170 source\-file mode is selected.
       
   171 The source file is then compiled and run.
       
   172 The \f[CB]\-\-source\f[R] option can be used to specify the source
       
   173 \f[I]version\f[R] or \f[I]N\f[R] of the source code.
       
   174 This determines the API that can be used.
       
   175 When you set \f[CB]\-\-source\f[R] \f[I]N\f[R], you can only use the public
       
   176 API that was defined in JDK \f[I]N\f[R].
       
   177 .RS
       
   178 .PP
       
   179 \f[B]Note:\f[R] The valid values of \f[I]N\f[R] change for each release,
       
   180 with new values added and old values removed.
       
   181 You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that is
       
   182 no longer supported.
       
   183 Supported values of \f[I]N\f[R] for this release are \f[CB]7\f[R],
       
   184 \f[CB]8\f[R], \f[CB]9\f[R], \f[CB]10\f[R], \f[CB]11\f[R], \f[CB]12\f[R], and
       
   185 \f[CB]13\f[R].
       
   186 .RE
       
   187 .PP
       
   188 If the file does not have the \f[CB]\&.java\f[R] extension, the
       
   189 \f[CB]\-\-source\f[R] option must be used to tell the \f[CB]java\f[R]
       
   190 command to use the source\-file mode.
       
   191 The \f[CB]\-\-source\f[R] option is used for cases when the source file is
       
   192 a "script" to be executed and the name of the source file does not
       
   193 follow the normal naming conventions for Java source files.
       
   194 .PP
       
   195 In source\-file mode, the effect is as though the source file is
       
   196 compiled into memory, and the first class found in the source file is
       
   197 executed.
       
   198 Any arguments placed after the name of the source file in the original
       
   199 command line are passed to the compiled class when it is executed.
       
   200 .PP
       
   201 For example, if a file were named \f[CB]HelloWorld.java\f[R] and contained
       
   202 a class named \f[CB]hello.World\f[R], then the source\-file mode command
       
   203 to launch the class would be:
       
   204 .RS
       
   205 .PP
       
   206 \f[CB]java\ HelloWorld.java\f[R]
       
   207 .RE
       
   208 .PP
       
   209 The example illustrates that the class can be in a named package, and
       
   210 does not need to be in the unnamed package.
       
   211 This use of source\-file mode is informally equivalent to using the
       
   212 following two commands where \f[CB]hello.World\f[R] is the name of the
       
   213 class in the package:
       
   214 .IP
    60 .nf
   215 .nf
    61 \fBjava\fR [\fIoptions\fR] \fIclassname\fR [\fIargs\fR]
   216 \f[CB]
       
   217 javac\ \-d\ <memory>\ HelloWorld.java
       
   218 java\ \-cp\ <memory>\ hello.World
       
   219 \f[R]
    62 .fi
   220 .fi
    63 .if n \{\
   221 .PP
    64 .RE
   222 \f[B]In source\-file mode, any additional command\-line options are
    65 .\}
   223 processed as follows:\f[R]
    66 .sp
   224 .IP \[bu] 2
    67 .if n \{\
   225 The launcher scans the options specified before the source file for any
    68 .RS 4
   226 that are relevant in order to compile the source file.
    69 .\}
   227 .RS 2
       
   228 .PP
       
   229 This includes: \f[CB]\-\-class\-path\f[R], \f[CB]\-\-module\-path\f[R],
       
   230 \f[CB]\-\-add\-exports\f[R], \f[CB]\-\-add\-modules\f[R],
       
   231 \f[CB]\-\-limit\-modules\f[R], \f[CB]\-\-patch\-module\f[R],
       
   232 \f[CB]\-\-upgrade\-module\-path\f[R], and any variant forms of those
       
   233 options.
       
   234 It also includes the new \f[CB]\-\-enable\-preview\f[R] option, described
       
   235 in JEP 12.
       
   236 .RE
       
   237 .IP \[bu] 2
       
   238 No provision is made to pass any additional options to the compiler,
       
   239 such as \f[CB]\-processor\f[R] or \f[CB]\-Werror\f[R].
       
   240 .IP \[bu] 2
       
   241 Command\-line argument files (\f[CB]\@\f[R]\-files) may be used in the
       
   242 standard way.
       
   243 Long lists of arguments for either the VM or the program being invoked
       
   244 may be placed in files specified on the command\-line by prefixing the
       
   245 filename with an \f[CB]\@\f[R] character.
       
   246 .PP
       
   247 \f[B]In source\-file mode, compilation proceeds as follows:\f[R]
       
   248 .IP \[bu] 2
       
   249 Any command\-line options that are relevant to the compilation
       
   250 environment are taken into account.
       
   251 .IP \[bu] 2
       
   252 No other source files are found and compiled, as if the source path is
       
   253 set to an empty value.
       
   254 .IP \[bu] 2
       
   255 Annotation processing is disabled, as if \f[CB]\-proc:none\f[R] is in
       
   256 effect.
       
   257 .IP \[bu] 2
       
   258 If a version is specified, via the \f[CB]\-\-source\f[R] option, the value
       
   259 is used as the argument for an implicit \f[CB]\-\-release\f[R] option for
       
   260 the compilation.
       
   261 This sets both the source version accepted by compiler and the system
       
   262 API that may be used by the code in the source file.
       
   263 .IP \[bu] 2
       
   264 The source file is compiled in the context of an unnamed module.
       
   265 .IP \[bu] 2
       
   266 The source file should contain one or more top\-level classes, the first
       
   267 of which is taken as the class to be executed.
       
   268 .IP \[bu] 2
       
   269 The compiler does not enforce the optional restriction defined at the
       
   270 end of JLS §7.6, that a type in a named package should exist in a file
       
   271 whose name is composed from the type name followed by the
       
   272 \f[CB]\&.java\f[R] extension.
       
   273 .IP \[bu] 2
       
   274 If the source file contains errors, appropriate error messages are
       
   275 written to the standard error stream, and the launcher exits with a
       
   276 non\-zero exit code.
       
   277 .PP
       
   278 \f[B]In source\-file mode, execution proceeds as follows:\f[R]
       
   279 .IP \[bu] 2
       
   280 The class to be executed is the first top\-level class found in the
       
   281 source file.
       
   282 It must contain a declaration of the standard
       
   283 \f[CB]public\ static\ void\ main(String[])\f[R] method.
       
   284 .IP \[bu] 2
       
   285 The compiled classes are loaded by a custom class loader, that delegates
       
   286 to the application class loader.
       
   287 This implies that classes appearing on the application class path cannot
       
   288 refer to any classes declared in the source file.
       
   289 .IP \[bu] 2
       
   290 The compiled classes are executed in the context of an unnamed module,
       
   291 as though \f[CB]\-\-add\-modules=ALL\-DEFAULT\f[R] is in effect.
       
   292 This is in addition to any other \f[CB]\-\-add\-module\f[R] options that
       
   293 may be have been specified on the command line.
       
   294 .IP \[bu] 2
       
   295 Any arguments appearing after the name of the file on the command line
       
   296 are passed to the standard main method in the obvious way.
       
   297 .IP \[bu] 2
       
   298 It is an error if there is a class on the application class path whose
       
   299 name is the same as that of the class to be executed.
       
   300 .PP
       
   301 See \f[B]JEP 330: Launch Single\-File Source\-Code Programs\f[R]
       
   302 [http://openjdk.java.net/jeps/330] for complete details.
       
   303 .SH USING THE JDK_JAVA_OPTIONS LAUNCHER ENVIRONMENT VARIABLE
       
   304 .PP
       
   305 \f[CB]JDK_JAVA_OPTIONS\f[R] prepends its content to the options parsed
       
   306 from the command line.
       
   307 The content of the \f[CB]JDK_JAVA_OPTIONS\f[R] environment variable is a
       
   308 list of arguments separated by white\-space characters (as determined by
       
   309 \f[CB]isspace()\f[R]).
       
   310 These are prepended to the command line arguments passed to
       
   311 \f[CB]java\f[R] launcher.
       
   312 The encoding requirement for the environment variable is the same as the
       
   313 \f[CB]java\f[R] command line on the system.
       
   314 \f[CB]JDK_JAVA_OPTIONS\f[R] environment variable content is treated in the
       
   315 same manner as that specified in the command line.
       
   316 .PP
       
   317 Single (\f[CB]\[aq]\f[R]) or double (\f[CB]"\f[R]) quotes can be used to
       
   318 enclose arguments that\ contain whitespace characters.
       
   319 All content between the open quote and the first matching close quote
       
   320 are preserved by simply removing the pair of quotes.
       
   321 In case a matching quote is not found, the launcher will abort with an
       
   322 error message.
       
   323 \f[CB]\@\f[R]\-files are supported as they are specified in the command
       
   324 line.
       
   325 However, as in \f[CB]\@\f[R]\-files, use of a wildcard is not supported.
       
   326 In order to mitigate potential misuse of \f[CB]JDK_JAVA_OPTIONS\f[R]
       
   327 behavior, options that specify the main class (such as \f[CB]\-jar\f[R])
       
   328 or cause the \f[CB]java\f[R] launcher to exit without executing the main
       
   329 class (such as \f[CB]\-h\f[R]) are disallowed in the environment variable.
       
   330 If any of these options appear in the environment variable, the launcher
       
   331 will abort with an error message.
       
   332 When \f[CB]JDK_JAVA_OPTIONS\f[R] is set, the launcher prints a message to
       
   333 stderr as a reminder.
       
   334 .PP
       
   335 \f[B]Example:\f[R]
       
   336 .IP
    70 .nf
   337 .nf
    71 \fBjava\fR [\fIoptions\fR] \fB\-jar\fR \fIfilename\fR [\fIargs\fR]
   338 \f[CB]
       
   339 $\ export\ JDK_JAVA_OPTIONS=\[aq]\-g\ \@file1\ \-Dprop=value\ \@file2\ \-Dws.prop="white\ spaces"\[aq]
       
   340 $\ java\ \-Xint\ \@file3
       
   341 \f[R]
    72 .fi
   342 .fi
    73 .if n \{\
   343 .PP
    74 .RE
   344 is equivalent to the command line:
    75 .\}
   345 .IP
    76 .PP
       
    77 \fIoptions\fR
       
    78 .RS 4
       
    79 Command\-line options separated by spaces\&. See Options\&.
       
    80 .RE
       
    81 .PP
       
    82 \fIclassname\fR
       
    83 .RS 4
       
    84 The name of the class to be launched\&.
       
    85 .RE
       
    86 .PP
       
    87 \fIfilename\fR
       
    88 .RS 4
       
    89 The name of the Java Archive (JAR) file to be called\&. Used only with the
       
    90 \fB\-jar\fR
       
    91 option\&.
       
    92 .RE
       
    93 .PP
       
    94 \fIargs\fR
       
    95 .RS 4
       
    96 The arguments passed to the
       
    97 \fBmain()\fR
       
    98 method separated by spaces\&.
       
    99 .RE
       
   100 .SH "DESCRIPTION"
       
   101 .PP
       
   102 The
       
   103 \fBjava\fR
       
   104 command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\*(Aqs
       
   105 \fBmain()\fR
       
   106 method\&. The method must be declared
       
   107 \fIpublic\fR
       
   108 and
       
   109 \fIstatic\fR, it must not return any value, and it must accept a
       
   110 \fBString\fR
       
   111 array as a parameter\&. The method declaration has the following form:
       
   112 .sp
       
   113 .if n \{\
       
   114 .RS 4
       
   115 .\}
       
   116 .nf
   346 .nf
   117 \fBpublic static void main(String[] args)\fR
   347 \f[CB]
   118  
   348 java\ \-g\ \@file1\ \-Dprop=value\ \@file2\ \-Dws.prop="white\ spaces"\ \-Xint\ \@file3
       
   349 \f[R]
   119 .fi
   350 .fi
   120 .if n \{\
   351 .SH OVERVIEW OF JAVA OPTIONS
   121 .RE
   352 .PP
   122 .\}
   353 The \f[CB]java\f[R] command supports a wide range of options in the
   123 .PP
   354 following categories:
   124 The
   355 .IP \[bu] 2
   125 \fBjava\fR
   356 \f[B]Standard Options for Java\f[R]: Options guaranteed to be supported
   126 command can be used to launch a JavaFX application by loading a class that either has a
   357 by all implementations of the Java Virtual Machine (JVM).
   127 \fBmain()\fR
   358 They\[aq]re used for common actions, such as checking the version of the
   128 method or that extends
   359 JRE, setting the class path, enabling verbose output, and so on.
   129 \fBjavafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the
   360 .IP \[bu] 2
   130 \fBApplication\fR
   361 \f[B]Extra Options for Java\f[R]: General purpose options that are
   131 class, calls its
   362 specific to the Java HotSpot Virtual Machine.
   132 \fBinit()\fR
   363 They aren\[aq]t guaranteed to be supported by all JVM implementations,
   133 method, and then calls the
   364 and are subject to change.
   134 \fBstart(javafx\&.stage\&.Stage)\fR
   365 These options start with \f[CB]\-X\f[R].
   135 method\&.
   366 .PP
   136 .PP
   367 The advanced options aren\[aq]t recommended for casual use.
   137 By default, the first argument that is not an option of the
   368 These are developer options used for tuning specific areas of the Java
   138 \fBjava\fR
   369 HotSpot Virtual Machine operation that often have specific system
   139 command is the fully qualified name of the class to be called\&. If the
   370 requirements and may require privileged access to system configuration
   140 \fB\-jar\fR
   371 parameters.
   141 option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the
   372 Several examples of performance tuning are provided in \f[B]Performance
   142 \fBMain\-Class\fR
   373 Tuning Examples\f[R].
   143 manifest header in its source code\&.
   374 These options aren\[aq]t guaranteed to be supported by all JVM
   144 .PP
   375 implementations and are subject to change.
   145 The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user\(cqs class path\&.
   376 Advanced options start with \f[CB]\-XX\f[R].
   146 .PP
   377 .IP \[bu] 2
   147 Arguments after the class file name or the JAR file name are passed to the
   378 \f[B]Advanced Runtime Options for Java\f[R]: Control the runtime behavior
   148 \fBmain()\fR
   379 of the Java HotSpot VM.
   149 method\&.
   380 .IP \[bu] 2
   150 .SH "OPTIONS"
   381 \f[B]Advanced JIT Compiler Options for java\f[R]: Control the dynamic
   151 .PP
   382 just\-in\-time (JIT) compilation performed by the Java HotSpot VM.
   152 The
   383 .IP \[bu] 2
   153 \fBjava\fR
   384 \f[B]Advanced Serviceability Options for Java\f[R]: Enable gathering
   154 command supports a wide range of options that can be divided into the following categories:
   385 system information and performing extensive debugging.
   155 .sp
   386 .IP \[bu] 2
   156 .RS 4
   387 \f[B]Advanced Garbage Collection Options for Java\f[R]: Control how
   157 .ie n \{\
   388 garbage collection (GC) is performed by the Java HotSpot
   158 \h'-04'\(bu\h'+03'\c
   389 .PP
   159 .\}
   390 Boolean options are used to either enable a feature that\[aq]s disabled
   160 .el \{\
   391 by default or disable a feature that\[aq]s enabled by default.
   161 .sp -1
   392 Such options don\[aq]t require a parameter.
   162 .IP \(bu 2.3
   393 Boolean \f[CB]\-XX\f[R] options are enabled using the plus sign
   163 .\}
   394 (\f[CB]\-XX:+\f[R]\f[I]OptionName\f[R]) and disabled using the minus sign
   164 Standard Options
   395 (\f[CB]\-XX:\-\f[R]\f[I]OptionName\f[R]).
   165 .RE
   396 .PP
   166 .sp
   397 For options that require an argument, the argument may be separated from
   167 .RS 4
   398 the option name by a space, a colon (:), or an equal sign (=), or the
   168 .ie n \{\
   399 argument may directly follow the option (the exact syntax differs for
   169 \h'-04'\(bu\h'+03'\c
   400 each option).
   170 .\}
   401 If you\[aq]re expected to specify the size in bytes, then you can use no
   171 .el \{\
   402 suffix, or use the suffix \f[CB]k\f[R] or \f[CB]K\f[R] for kilobytes (KB),
   172 .sp -1
   403 \f[CB]m\f[R] or \f[CB]M\f[R] for megabytes (MB), or \f[CB]g\f[R] or \f[CB]G\f[R]
   173 .IP \(bu 2.3
   404 for gigabytes (GB).
   174 .\}
   405 For example, to set the size to 8 GB, you can specify either
   175 Non\-Standard Options
   406 \f[CB]8g\f[R], \f[CB]8192m\f[R], \f[CB]8388608k\f[R], or \f[CB]8589934592\f[R]
   176 .RE
   407 as the argument.
   177 .sp
   408 If you are expected to specify the percentage, then use a number from 0
   178 .RS 4
   409 to 1.
   179 .ie n \{\
   410 For example, specify \f[CB]0.25\f[R] for 25%.
   180 \h'-04'\(bu\h'+03'\c
   411 .PP
   181 .\}
   412 The following sections describe the options that are obsolete,
   182 .el \{\
   413 deprecated, and removed:
   183 .sp -1
   414 .IP \[bu] 2
   184 .IP \(bu 2.3
   415 \f[B]Deprecated Java Options\f[R]: Accepted and acted upon \-\-\- a
   185 .\}
   416 warning is issued when they\[aq]re used.
   186 Advanced Runtime Options
   417 .IP \[bu] 2
   187 .RE
   418 \f[B]Obsolete Java Options\f[R]: Accepted but ignored \-\-\- a warning is
   188 .sp
   419 issued when they\[aq]re used.
   189 .RS 4
   420 .IP \[bu] 2
   190 .ie n \{\
   421 \f[B]Removed Java Options\f[R]: Removed \-\-\- using them results in an
   191 \h'-04'\(bu\h'+03'\c
   422 error.
   192 .\}
   423 .SH STANDARD OPTIONS FOR JAVA
   193 .el \{\
   424 .PP
   194 .sp -1
   425 These are the most commonly used options supported by all
   195 .IP \(bu 2.3
   426 implementations of the JVM.
   196 .\}
   427 .RS
   197 Advanced JIT Compiler Options
   428 .PP
   198 .RE
   429 \f[B]Note:\f[R] To specify an argument for a long option, you can use
   199 .sp
   430 either \f[CB]\-\-\f[R]\f[I]name\f[R]\f[CB]=\f[R]\f[I]value\f[R] or
   200 .RS 4
   431 \f[CB]\-\-\f[R]\f[I]name\f[R] \f[I]value\f[R].
   201 .ie n \{\
   432 .RE
   202 \h'-04'\(bu\h'+03'\c
   433 .TP
   203 .\}
   434 .B \f[CB]\-agentlib:\f[R]\f[I]libname\f[R][\f[CB]=\f[R]\f[I]options\f[R]]
   204 .el \{\
   435 Loads the specified native agent library.
   205 .sp -1
   436 After the library name, a comma\-separated list of options specific to
   206 .IP \(bu 2.3
   437 the library can be used.
   207 .\}
   438 .RS
   208 Advanced Serviceability Options
   439 .IP \[bu] 2
   209 .RE
   440 \f[B]Oracle Solaris, Linux, and macOS:\f[R] If the option
   210 .sp
   441 \f[CB]\-agentlib:foo\f[R] is specified, then the JVM attempts to load the
   211 .RS 4
   442 library named \f[CB]libfoo.so\f[R] in the location specified by the
   212 .ie n \{\
   443 \f[CB]LD_LIBRARY_PATH\f[R] system variable (on macOS this variable is
   213 \h'-04'\(bu\h'+03'\c
   444 \f[CB]DYLD_LIBRARY_PATH\f[R]).
   214 .\}
   445 .IP \[bu] 2
   215 .el \{\
   446 \f[B]Windows:\f[R] If the option \f[CB]\-agentlib:foo\f[R] is specified,
   216 .sp -1
   447 then the JVM attempts to load the library named \f[CB]foo.dll\f[R] in the
   217 .IP \(bu 2.3
   448 location specified by the \f[CB]PATH\f[R] system variable.
   218 .\}
   449 .RS 2
   219 Advanced Garbage Collection Options
   450 .PP
   220 .RE
   451 The following example shows how to load the Java Debug Wire Protocol
   221 .PP
   452 (JDWP) library and listen for the socket connection on port 8000,
   222 Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM)\&. They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on\&.
   453 suspending the JVM before the main class loads:
   223 .PP
   454 .RS
   224 Non\-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with
   455 .PP
   225 \fB\-X\fR\&.
   456 \f[CB]\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\f[R]
   226 .PP
   457 .RE
   227 Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with
   458 .RE
   228 \fB\-XX\fR\&.
   459 .RE
   229 .PP
   460 .TP
   230 To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document\&.
   461 .B \f[CB]\-agentpath:\f[R]\f[I]pathname\f[R][\f[CB]=\f[R]\f[I]options\f[R]]
   231 .PP
   462 Loads the native agent library specified by the absolute path name.
   232 Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean
   463 This option is equivalent to \f[CB]\-agentlib\f[R] but uses the full path
   233 \fB\-XX\fR
   464 and file name of the library.
   234 options are enabled using the plus sign (\fB\-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\fB\-XX:\-\fR\fIOptionName\fR)\&.
   465 .RS
   235 .PP
   466 .RE
   236 For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix
   467 .TP
   237 \fBk\fR
   468 .B \f[CB]\-\-class\-path\f[R] \f[I]classpath\f[R], \f[CB]\-classpath\f[R] \f[I]classpath\f[R], or \f[CB]\-cp\f[R] \f[I]classpath\f[R]
   238 or
   469 A semicolon (\f[CB];\f[R]) separated list of directories, JAR archives,
   239 \fBK\fR
   470 and ZIP archives to search for class files.
   240 for kilobytes (KB),
   471 .RS
   241 \fBm\fR
   472 .PP
   242 or
   473 Specifying \f[I]classpath\f[R] overrides any setting of the
   243 \fBM\fR
   474 \f[CB]CLASSPATH\f[R] environment variable.
   244 for megabytes (MB),
   475 If the class path option isn\[aq]t used and \f[I]classpath\f[R] isn\[aq]t
   245 \fBg\fR
   476 set, then the user class path consists of the current directory (.).
   246 or
   477 .PP
   247 \fBG\fR
   478 As a special convenience, a class path element that contains a base name
   248 for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either
   479 of an asterisk (*) is considered equivalent to specifying a list of all
   249 \fB8g\fR,
   480 the files in the directory with the extension \f[CB]\&.jar\f[R] or
   250 \fB8192m\fR,
   481 \f[CB]\&.JAR\f[R] .
   251 \fB8388608k\fR, or
   482 A Java program can\[aq]t tell the difference between the two
   252 \fB8589934592\fR
   483 invocations.
   253 as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify
   484 For example, if the directory mydir contains \f[CB]a.jar\f[R] and
   254 \fB0\&.25\fR
   485 \f[CB]b.JAR\f[R], then the class path element mydir/* is expanded to
   255 for 25%)\&.
   486 \f[CB]A.jar:b.JAR\f[R], except that the order of JAR files is unspecified.
   256 .SS "Standard Options"
   487 All \f[CB]\&.jar\f[R] files in the specified directory, even hidden ones,
   257 .PP
   488 are included in the list.
   258 These are the most commonly used options that are supported by all implementations of the JVM\&.
   489 A class path entry consisting of an asterisk (*) expands to a list of
   259 .PP
   490 all the jar files in the current directory.
   260 \-agentlib:\fIlibname\fR[=\fIoptions\fR]
   491 The \f[CB]CLASSPATH\f[R] environment variable, where defined, is similarly
   261 .RS 4
   492 expanded.
   262 Loads the specified native agent library\&. After the library name, a comma\-separated list of options specific to the library can be used\&.
   493 Any class path wildcard expansion that occurs before the Java VM is
   263 .sp
   494 started.
   264 If the option
   495 Java programs never see wildcards that aren\[aq]t expanded except by
   265 \fB\-agentlib:foo\fR
   496 querying the environment, such as by calling
   266 is specified, then the JVM attempts to load the library named
   497 \f[CB]System.getenv("CLASSPATH")\f[R].
   267 \fBlibfoo\&.so\fR
   498 .RE
   268 in the location specified by the
   499 .TP
   269 \fBLD_LIBRARY_PATH\fR
   500 .B \f[CB]\-\-disable\-\@files\f[R]
   270 system variable (on OS X this variable is
   501 Can be used anywhere on the command line, including in an argument file,
   271 \fBDYLD_LIBRARY_PATH\fR)\&.
   502 to prevent further \f[CB]\@filename\f[R] expansion.
   272 .sp
   503 This option stops expanding \f[CB]\@\f[R]\-argfiles after the option.
   273 The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:
   504 .RS
   274 .sp
   505 .RE
   275 .if n \{\
   506 .TP
   276 .RS 4
   507 .B \f[CB]\-\-enable\-preview\f[R]
   277 .\}
   508 Allows classes to depend on \f[B]preview features\f[R]
       
   509 [https://docs.oracle.com/en/java/javase/12/language/index.html#JSLAN\-GUID\-5A82FE0E\-0CA4\-4F1F\-B075\-564874FE2823]
       
   510 of the release.
       
   511 .RS
       
   512 .RE
       
   513 .TP
       
   514 .B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]... or \f[CB]\-p\f[R] \f[I]modulepath\f[R]
       
   515 A semicolon (\f[CB];\f[R]) separated list of directories in which each
       
   516 directory is a directory of modules.
       
   517 .RS
       
   518 .RE
       
   519 .TP
       
   520 .B \f[CB]\-\-upgrade\-module\-path\f[R] \f[I]modulepath\f[R]...
       
   521 A semicolon (\f[CB];\f[R]) separated list of directories in which each
       
   522 directory is a directory of modules that replace upgradeable modules in
       
   523 the runtime image.
       
   524 .RS
       
   525 .RE
       
   526 .TP
       
   527 .B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...]
       
   528 Specifies the root modules to resolve in addition to the initial module.
       
   529 \f[I]module\f[R] also can be \f[CB]ALL\-DEFAULT\f[R], \f[CB]ALL\-SYSTEM\f[R],
       
   530 and \f[CB]ALL\-MODULE\-PATH\f[R].
       
   531 .RS
       
   532 .RE
       
   533 .TP
       
   534 .B \f[CB]\-\-list\-modules\f[R]
       
   535 Lists the observable modules and then exits.
       
   536 .RS
       
   537 .RE
       
   538 .TP
       
   539 .B \f[CB]\-d\f[R] \f[I]module_name\f[R] or \f[CB]\-\-describe\-module\f[R] \f[I]module_name\f[R]
       
   540 Describes a specified module and then exits.
       
   541 .RS
       
   542 .RE
       
   543 .TP
       
   544 .B \f[CB]\-\-dry\-run\f[R]
       
   545 Creates the VM but doesn\[aq]t execute the main method.
       
   546 This \f[CB]\-\-dry\-run\f[R] option might be useful for validating the
       
   547 command\-line options such as the module system configuration.
       
   548 .RS
       
   549 .RE
       
   550 .TP
       
   551 .B \f[CB]\-\-validate\-modules\f[R]
       
   552 Validates all modules and exit.
       
   553 This option is helpful for finding conflicts and other errors with
       
   554 modules on the module path.
       
   555 .RS
       
   556 .RE
       
   557 .TP
       
   558 .B \f[CB]\-D\f[R]\f[I]property\f[R]\f[CB]=\f[R]\f[I]value\f[R]
       
   559 Sets a system property value.
       
   560 The \f[I]property\f[R] variable is a string with no spaces that
       
   561 represents the name of the property.
       
   562 The \f[I]value\f[R] variable is a string that represents the value of the
       
   563 property.
       
   564 If \f[I]value\f[R] is a string with spaces, then enclose it in quotation
       
   565 marks (for example \f[CB]\-Dfoo="foo\ bar"\f[R]).
       
   566 .RS
       
   567 .RE
       
   568 .TP
       
   569 .B \f[CB]\-disableassertions\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] or \f[CB]\-da\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]]
       
   570 Disables assertions.
       
   571 By default, assertions are disabled in all packages and classes.
       
   572 With no arguments, \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) disables
       
   573 assertions in all packages and classes.
       
   574 With the \f[I]packagename\f[R] argument ending in \f[CB]\&...\f[R], the
       
   575 switch disables assertions in the specified package and any subpackages.
       
   576 If the argument is simply \f[CB]\&...\f[R], then the switch disables
       
   577 assertions in the unnamed package in the current working directory.
       
   578 With the \f[I]classname\f[R] argument, the switch disables assertions in
       
   579 the specified class.
       
   580 .RS
       
   581 .PP
       
   582 The \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) option applies to all
       
   583 class loaders and to system classes (which don\[aq]t have a class
       
   584 loader).
       
   585 There\[aq]s one exception to this rule: If the option is provided with
       
   586 no arguments, then it doesn\[aq]t apply to system classes.
       
   587 This makes it easy to disable assertions in all classes except for
       
   588 system classes.
       
   589 The \f[CB]\-disablesystemassertions\f[R] option enables you to disable
       
   590 assertions in all system classes.
       
   591 To explicitly enable assertions in specific packages or classes, use the
       
   592 \f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) option.
       
   593 Both options can be used at the same time.
       
   594 For example, to run the \f[CB]MyClass\f[R] application with assertions
       
   595 enabled in the package \f[CB]com.wombat.fruitbat\f[R] (and any
       
   596 subpackages) but disabled in the class
       
   597 \f[CB]com.wombat.fruitbat.Brickbat\f[R], use the following command:
       
   598 .RS
       
   599 .PP
       
   600 \f[CB]java\ \-ea:com.wombat.fruitbat...\ \-da:com.wombat.fruitbat.Brickbat\ MyClass\f[R]
       
   601 .RE
       
   602 .RE
       
   603 .TP
       
   604 .B \f[CB]\-disablesystemassertions\f[R] or \f[CB]\-dsa\f[R]
       
   605 Disables assertions in all system classes.
       
   606 .RS
       
   607 .RE
       
   608 .TP
       
   609 .B \f[CB]\-enableassertions\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]] or \f[CB]\-ea\f[R][\f[CB]:\f[R][\f[I]packagename\f[R]]...|\f[CB]:\f[R]\f[I]classname\f[R]]
       
   610 Enables assertions.
       
   611 By default, assertions are disabled in all packages and classes.
       
   612 With no arguments, \f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) enables
       
   613 assertions in all packages and classes.
       
   614 With the \f[I]packagename\f[R] argument ending in \f[CB]\&...\f[R], the
       
   615 switch enables assertions in the specified package and any subpackages.
       
   616 If the argument is simply \f[CB]\&...\f[R], then the switch enables
       
   617 assertions in the unnamed package in the current working directory.
       
   618 With the \f[I]classname\f[R] argument, the switch enables assertions in
       
   619 the specified class.
       
   620 .RS
       
   621 .PP
       
   622 The \f[CB]\-enableassertions\f[R] (\f[CB]\-ea\f[R]) option applies to all
       
   623 class loaders and to system classes (which don\[aq]t have a class
       
   624 loader).
       
   625 There\[aq]s one exception to this rule: If the option is provided with
       
   626 no arguments, then it doesn\[aq]t apply to system classes.
       
   627 This makes it easy to enable assertions in all classes except for system
       
   628 classes.
       
   629 The \f[CB]\-enablesystemassertions\f[R] option provides a separate switch
       
   630 to enable assertions in all system classes.
       
   631 To explicitly disable assertions in specific packages or classes, use
       
   632 the \f[CB]\-disableassertions\f[R] (\f[CB]\-da\f[R]) option.
       
   633 If a single command contains multiple instances of these switches, then
       
   634 they\[aq]re processed in order, before loading any classes.
       
   635 For example, to run the \f[CB]MyClass\f[R] application with assertions
       
   636 enabled only in the package \f[CB]com.wombat.fruitbat\f[R] (and any
       
   637 subpackages) but disabled in the class
       
   638 \f[CB]com.wombat.fruitbat.Brickbat\f[R], use the following command:
       
   639 .RS
       
   640 .PP
       
   641 \f[CB]java\ \-ea:com.wombat.fruitbat...\ \-da:com.wombat.fruitbat.Brickbat\ MyClass\f[R]
       
   642 .RE
       
   643 .RE
       
   644 .TP
       
   645 .B \f[CB]\-enablesystemassertions\f[R] or \f[CB]\-esa\f[R]
       
   646 Enables assertions in all system classes.
       
   647 .RS
       
   648 .RE
       
   649 .TP
       
   650 .B \f[CB]\-help\f[R], \f[CB]\-h\f[R], or \f[CB]\-?\f[R]
       
   651 Prints the help message to the error stream.
       
   652 .RS
       
   653 .RE
       
   654 .TP
       
   655 .B \f[CB]\-\-help\f[R]
       
   656 Prints the help message to the output stream.
       
   657 .RS
       
   658 .RE
       
   659 .TP
       
   660 .B \f[CB]\-javaagent:\f[R]\f[I]jarpath\f[R][\f[CB]=\f[R]\f[I]options\f[R]]
       
   661 Loads the specified Java programming language agent.
       
   662 See \f[CB]java.lang.instrument\f[R].
       
   663 .RS
       
   664 .RE
       
   665 .TP
       
   666 .B \f[CB]\-\-show\-version\f[R]
       
   667 Prints the product version to the output stream and continues.
       
   668 .RS
       
   669 .RE
       
   670 .TP
       
   671 .B \f[CB]\-showversion\f[R]
       
   672 Prints the product version to the error stream and continues.
       
   673 .RS
       
   674 .RE
       
   675 .TP
       
   676 .B \f[CB]\-\-show\-module\-resolution\f[R]
       
   677 Shows module resolution output during startup.
       
   678 .RS
       
   679 .RE
       
   680 .TP
       
   681 .B \f[CB]\-splash:\f[R]\f[I]imagepath\f[R]
       
   682 Shows the splash screen with the image specified by \f[I]imagepath\f[R].
       
   683 HiDPI scaled images are automatically supported and used if available.
       
   684 The unscaled image file name, such as \f[CB]image.ext\f[R], should always
       
   685 be passed as the argument to the \f[CB]\-splash\f[R] option.
       
   686 The most appropriate scaled image provided is picked up automatically.
       
   687 .RS
       
   688 .PP
       
   689 For example, to show the \f[CB]splash.gif\f[R] file from the
       
   690 \f[CB]images\f[R] directory when starting your application, use the
       
   691 following option:
       
   692 .RS
       
   693 .PP
       
   694 \f[CB]\-splash:images/splash.gif\f[R]
       
   695 .RE
       
   696 .PP
       
   697 See the SplashScreen API documentation for more information.
       
   698 .RE
       
   699 .TP
       
   700 .B \f[CB]\-verbose:class\f[R]
       
   701 Displays information about each loaded class.
       
   702 .RS
       
   703 .RE
       
   704 .TP
       
   705 .B \f[CB]\-verbose:gc\f[R]
       
   706 Displays information about each garbage collection (GC) event.
       
   707 .RS
       
   708 .RE
       
   709 .TP
       
   710 .B \f[CB]\-verbose:jni\f[R]
       
   711 Displays information about the use of native methods and other Java
       
   712 Native Interface (JNI) activity.
       
   713 .RS
       
   714 .RE
       
   715 .TP
       
   716 .B \f[CB]\-verbose:module\f[R]
       
   717 Displays information about the modules in use.
       
   718 .RS
       
   719 .RE
       
   720 .TP
       
   721 .B \f[CB]\-\-version\f[R]
       
   722 Prints product version to the output stream and exits.
       
   723 .RS
       
   724 .RE
       
   725 .TP
       
   726 .B \f[CB]\-version\f[R]
       
   727 Prints product version to the error stream and exits.
       
   728 .RS
       
   729 .RE
       
   730 .TP
       
   731 .B \f[CB]\-X\f[R]
       
   732 Prints the help on extra options to the error stream.
       
   733 .RS
       
   734 .RE
       
   735 .TP
       
   736 .B \f[CB]\-\-help\-extra\f[R]
       
   737 Prints the help on extra options to the output stream.
       
   738 .RS
       
   739 .RE
       
   740 .TP
       
   741 .B \f[CB]\@\f[R]\f[I]argfile\f[R]
       
   742 Specifies one or more argument files prefixed by \f[CB]\@\f[R] used by the
       
   743 \f[CB]java\f[R] command.
       
   744 It isn\[aq]t uncommon for the \f[CB]java\f[R] command line to be very long
       
   745 because of the \f[CB]\&.jar\f[R] files needed in the classpath.
       
   746 The \f[CB]\@\f[R]\f[I]argfile\f[R] option overcomes command\-line length
       
   747 limitations by enabling the launcher to expand the contents of argument
       
   748 files after shell expansion, but before argument processing.
       
   749 Contents in the argument files are expanded because otherwise, they
       
   750 would be specified on the command line until the
       
   751 \f[CB]\-\-disable\-\@files\f[R] option was encountered.
       
   752 .RS
       
   753 .PP
       
   754 The argument files can also contain the main class name and all options.
       
   755 If an argument file contains all of the options required by the
       
   756 \f[CB]java\f[R] command, then the command line could simply be:
       
   757 .RS
       
   758 .PP
       
   759 \f[CB]java\ \@\f[R]\f[I]argfile\f[R]
       
   760 .RE
       
   761 .PP
       
   762 See \f[B]java Command\-Line Argument Files\f[R] for a description and
       
   763 examples of using \f[CB]\@\f[R]\-argfiles.
       
   764 .RE
       
   765 .SH EXTRA OPTIONS FOR JAVA
       
   766 .PP
       
   767 The following \f[CB]java\f[R] options are general purpose options that are
       
   768 specific to the Java HotSpot Virtual Machine.
       
   769 .TP
       
   770 .B \f[CB]\-Xbatch\f[R]
       
   771 Disables background compilation.
       
   772 By default, the JVM compiles the method as a background task, running
       
   773 the method in interpreter mode until the background compilation is
       
   774 finished.
       
   775 The \f[CB]\-Xbatch\f[R] flag disables background compilation so that
       
   776 compilation of all methods proceeds as a foreground task until
       
   777 completed.
       
   778 This option is equivalent to \f[CB]\-XX:\-BackgroundCompilation\f[R].
       
   779 .RS
       
   780 .RE
       
   781 .TP
       
   782 .B \f[CB]\-Xbootclasspath/a:\f[R]\f[I]directories\f[R]|\f[I]zip\f[R]|\f[I]JAR\-files\f[R]
       
   783 Specifies a list of directories, JAR files, and ZIP archives to append
       
   784 to the end of the default bootstrap class path.
       
   785 .RS
       
   786 .PP
       
   787 \f[B]Oracle Solaris, Linux, and macOS:\f[R] Colons (\f[CB]:\f[R]) separate
       
   788 entities in this list.
       
   789 .PP
       
   790 \f[B]Windows:\f[R] Semicolons (\f[CB];\f[R]) separate entities in this
       
   791 list.
       
   792 .RE
       
   793 .TP
       
   794 .B \f[CB]\-Xcheck:jni\f[R]
       
   795 Performs additional checks for Java Native Interface (JNI) functions.
       
   796 Specifically, it validates the parameters passed to the JNI function and
       
   797 the runtime environment data before processing the JNI request.
       
   798 It also checks for pending exceptions between JNI calls.
       
   799 Any invalid data encountered indicates a problem in the native code, and
       
   800 the JVM terminates with an irrecoverable error in such cases.
       
   801 Expect a performance degradation when this option is used.
       
   802 .RS
       
   803 .RE
       
   804 .TP
       
   805 .B \f[CB]\-Xcomp\f[R]
       
   806 Forces compilation of methods on first invocation.
       
   807 By default, the Client VM (\f[CB]\-client\f[R]) performs 1,000 interpreted
       
   808 method invocations and the Server VM (\f[CB]\-server\f[R]) performs 10,000
       
   809 interpreted method invocations to gather information for efficient
       
   810 compilation.
       
   811 Specifying the \f[CB]\-Xcomp\f[R] option disables interpreted method
       
   812 invocations to increase compilation performance at the expense of
       
   813 efficiency.
       
   814 You can also change the number of interpreted method invocations before
       
   815 compilation using the \f[CB]\-XX:CompileThreshold\f[R] option.
       
   816 .RS
       
   817 .RE
       
   818 .TP
       
   819 .B \f[CB]\-Xdebug\f[R]
       
   820 Does nothing.
       
   821 Provided for backward compatibility.
       
   822 .RS
       
   823 .RE
       
   824 .TP
       
   825 .B \f[CB]\-Xdiag\f[R]
       
   826 Shows additional diagnostic messages.
       
   827 .RS
       
   828 .RE
       
   829 .TP
       
   830 .B \f[CB]\-Xint\f[R]
       
   831 Runs the application in interpreted\-only mode.
       
   832 Compilation to native code is disabled, and all bytecode is executed by
       
   833 the interpreter.
       
   834 The performance benefits offered by the just\-in\-time (JIT) compiler
       
   835 aren\[aq]t present in this mode.
       
   836 .RS
       
   837 .RE
       
   838 .TP
       
   839 .B \f[CB]\-Xinternalversion\f[R]
       
   840 Displays more detailed JVM version information than the
       
   841 \f[CB]\-version\f[R] option, and then exits.
       
   842 .RS
       
   843 .RE
       
   844 .TP
       
   845 .B \f[CB]\-Xlog:\f[R]\f[I]option\f[R]
       
   846 Configure or enable logging with the Java Virtual Machine (JVM) unified
       
   847 logging framework.
       
   848 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
       
   849 .RS
       
   850 .RE
       
   851 .TP
       
   852 .B \f[CB]\-Xmixed\f[R]
       
   853 Executes all bytecode by the interpreter except for hot methods, which
       
   854 are compiled to native code.
       
   855 .RS
       
   856 .RE
       
   857 .TP
       
   858 .B \f[CB]\-Xmn\f[R] \f[I]size\f[R]
       
   859 Sets the initial and maximum size (in bytes) of the heap for the young
       
   860 generation (nursery) in the generational collectors.
       
   861 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
   862 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
   863 \f[CB]G\f[R] to indicate gigabytes.
       
   864 The young generation region of the heap is used for new objects.
       
   865 GC is performed in this region more often than in other regions.
       
   866 If the size for the young generation is too small, then a lot of minor
       
   867 garbage collections are performed.
       
   868 If the size is too large, then only full garbage collections are
       
   869 performed, which can take a long time to complete.
       
   870 It is recommended that you do not set the size for the young generation
       
   871 for the G1 collector, and keep the size for the young generation greater
       
   872 than 25% and less than 50% of the overall heap size for other
       
   873 collectors.
       
   874 The following examples show how to set the initial and maximum size of
       
   875 young generation to 256 MB using various units:
       
   876 .RS
       
   877 .IP
   278 .nf
   878 .nf
   279 \fB\-agentlib:hprof=cpu=samples,interval=20,depth=3\fR
   879 \f[CB]
   280  
   880 \-Xmn256m
       
   881 \-Xmn262144k
       
   882 \-Xmn268435456
       
   883 \f[R]
   281 .fi
   884 .fi
   282 .if n \{\
   885 .PP
   283 .RE
   886 Instead of the \f[CB]\-Xmn\f[R] option to set both the initial and maximum
   284 .\}
   887 size of the heap for the young generation, you can use
   285 The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:
   888 \f[CB]\-XX:NewSize\f[R] to set the initial size and
   286 .sp
   889 \f[CB]\-XX:MaxNewSize\f[R] to set the maximum size.
   287 .if n \{\
   890 .RE
   288 .RS 4
   891 .TP
   289 .\}
   892 .B \f[CB]\-Xms\f[R] \f[I]size\f[R]
       
   893 Sets the minimum and initial size (in bytes) of the heap.
       
   894 This value must be a multiple of 1024 and greater than 1 MB.
       
   895 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
   896 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, \f[CB]g\f[R] or \f[CB]G\f[R]
       
   897 to indicate gigabytes.
       
   898 The following examples show how to set the size of allocated memory to 6
       
   899 MB using various units:
       
   900 .RS
       
   901 .IP
   290 .nf
   902 .nf
   291 \fB\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fR
   903 \f[CB]
   292  
   904 \-Xms6291456
       
   905 \-Xms6144k
       
   906 \-Xms6m
       
   907 \f[R]
   293 .fi
   908 .fi
   294 .if n \{\
   909 .PP
   295 .RE
   910 Instead of the \f[CB]\-Xms\f[R] option to set both the minimum and initial
   296 .\}
   911 size of the heap, you can use \f[CB]\-XX:MinHeapSize\f[R] to set the
   297 For more information about the native agent libraries, refer to the following:
   912 minimum size and \f[CB]\-XX:InitialHeapSize\f[R] to set the initial size.
   298 .sp
   913 .PP
   299 .RS 4
   914 If you don\[aq]t set this option, the initial size is set as the sum of
   300 .ie n \{\
   915 the sizes allocated for the old generation and the young generation.
   301 \h'-04'\(bu\h'+03'\c
   916 The initial size of the heap for the young generation can be set using
   302 .\}
   917 the \f[CB]\-Xmn\f[R] option or the \f[CB]\-XX:NewSize\f[R] option.
   303 .el \{\
   918 .RE
   304 .sp -1
   919 .TP
   305 .IP \(bu 2.3
   920 .B \f[CB]\-Xmx\f[R] \f[I]size\f[R]
   306 .\}
   921 Specifies the maximum size (in bytes) of the heap.
   307 The
   922 This value must be a multiple of 1024 and greater than 2 MB.
   308 \fBjava\&.lang\&.instrument\fR
   923 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
   309 package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
   924 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
   310 .RE
   925 \f[CB]G\f[R] to indicate gigabytes.
   311 .sp
   926 The default value is chosen at runtime based on system configuration.
   312 .RS 4
   927 For server deployments, \f[CB]\-Xms\f[R] and \f[CB]\-Xmx\f[R] are often set
   313 .ie n \{\
   928 to the same value.
   314 \h'-04'\(bu\h'+03'\c
   929 The following examples show how to set the maximum allowed size of
   315 .\}
   930 allocated memory to 80 MB using various units:
   316 .el \{\
   931 .RS
   317 .sp -1
   932 .IP
   318 .IP \(bu 2.3
       
   319 .\}
       
   320 Agent Command Line Options in the JVM Tools Interface guide at http://docs\&.oracle\&.com/javase/8/docs/platform/jvmti/jvmti\&.html#starting
       
   321 .RE
       
   322 .RE
       
   323 .PP
       
   324 \-agentpath:\fIpathname\fR[=\fIoptions\fR]
       
   325 .RS 4
       
   326 Loads the native agent library specified by the absolute path name\&. This option is equivalent to
       
   327 \fB\-agentlib\fR
       
   328 but uses the full path and file name of the library\&.
       
   329 .RE
       
   330 .PP
       
   331 \-client
       
   332 .RS 4
       
   333 Selects the Java HotSpot Client VM\&. The 64\-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
       
   334 .sp
       
   335 For default JVM selection, see Server\-Class Machine Detection at
       
   336 http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
       
   337 .RE
       
   338 .PP
       
   339 \-D\fIproperty\fR=\fIvalue\fR
       
   340 .RS 4
       
   341 Sets a system property value\&. The
       
   342 \fIproperty\fR
       
   343 variable is a string with no spaces that represents the name of the property\&. The
       
   344 \fIvalue\fR
       
   345 variable is a string that represents the value of the property\&. If
       
   346 \fIvalue\fR
       
   347 is a string with spaces, then enclose it in quotation marks (for example
       
   348 \fB\-Dfoo="foo bar"\fR)\&.
       
   349 .RE
       
   350 .PP
       
   351 \-d32
       
   352 .RS 4
       
   353 Runs the application in a 32\-bit environment\&. If a 32\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
       
   354 .RE
       
   355 .PP
       
   356 \-d64
       
   357 .RS 4
       
   358 Runs the application in a 64\-bit environment\&. If a 64\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
       
   359 .sp
       
   360 Currently only the Java HotSpot Server VM supports 64\-bit operation, and the
       
   361 \fB\-server\fR
       
   362 option is implicit with the use of
       
   363 \fB\-d64\fR\&. The
       
   364 \fB\-client\fR
       
   365 option is ignored with the use of
       
   366 \fB\-d64\fR\&. This is subject to change in a future release\&.
       
   367 .RE
       
   368 .PP
       
   369 \-disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
       
   370 .br
       
   371 \-da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
       
   372 .RS 4
       
   373 Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
       
   374 .sp
       
   375 With no arguments,
       
   376 \fB\-disableassertions\fR
       
   377 (\fB\-da\fR) disables assertions in all packages and classes\&. With the
       
   378 \fIpackagename\fR
       
   379 argument ending in
       
   380 \fB\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply
       
   381 \fB\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the
       
   382 \fIclassname\fR
       
   383 argument, the switch disables assertions in the specified class\&.
       
   384 .sp
       
   385 The
       
   386 \fB\-disableassertions\fR
       
   387 (\fB\-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The
       
   388 \fB\-disablesystemassertions\fR
       
   389 option enables you to disable assertions in all system classes\&.
       
   390 .sp
       
   391 To explicitly enable assertions in specific packages or classes, use the
       
   392 \fB\-enableassertions\fR
       
   393 (\fB\-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the
       
   394 \fBMyClass\fR
       
   395 application with assertions enabled in package
       
   396 \fBcom\&.wombat\&.fruitbat\fR
       
   397 (and any subpackages) but disabled in class
       
   398 \fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
       
   399 .sp
       
   400 .if n \{\
       
   401 .RS 4
       
   402 .\}
       
   403 .nf
   933 .nf
   404 \fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
   934 \f[CB]
   405  
   935 \-Xmx83886080
       
   936 \-Xmx81920k
       
   937 \-Xmx80m
       
   938 \f[R]
   406 .fi
   939 .fi
   407 .if n \{\
   940 .PP
   408 .RE
   941 The \f[CB]\-Xmx\f[R] option is equivalent to \f[CB]\-XX:MaxHeapSize\f[R].
   409 .\}
   942 .RE
   410 .RE
   943 .TP
   411 .PP
   944 .B \f[CB]\-Xnoclassgc\f[R]
   412 \-disablesystemassertions
   945 Disables garbage collection (GC) of classes.
   413 .br
   946 This can save some GC time, which shortens interruptions during the
   414 \-dsa
   947 application run.
   415 .RS 4
   948 When you specify \f[CB]\-Xnoclassgc\f[R] at startup, the class objects in
   416 Disables assertions in all system classes\&.
   949 the application are left untouched during GC and are always be
   417 .RE
   950 considered live.
   418 .PP
   951 This can result in more memory being permanently occupied which, if not
   419 \-enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
   952 used carefully, throws an out\-of\-memory exception.
   420 .br
   953 .RS
   421 \-ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
   954 .RE
   422 .RS 4
   955 .TP
   423 Enables assertions\&. By default, assertions are disabled in all packages and classes\&.
   956 .B \f[CB]\-Xrs\f[R]
   424 .sp
   957 Reduces the use of operating system signals by the JVM.
   425 With no arguments,
   958 Shutdown hooks enable the orderly shutdown of a Java application by
   426 \fB\-enableassertions\fR
   959 running user cleanup code (such as closing database connections) at
   427 (\fB\-ea\fR) enables assertions in all packages and classes\&. With the
   960 shutdown, even if the JVM terminates abruptly.
   428 \fIpackagename\fR
   961 .RS
   429 argument ending in
   962 .IP \[bu] 2
   430 \fB\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply
   963 \f[B]Oracle Solaris, Linux, and macOS:\f[R]
   431 \fB\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the
   964 .RS 2
   432 \fIclassname\fR
   965 .IP \[bu] 2
   433 argument, the switch enables assertions in the specified class\&.
   966 The JVM catches signals to implement shutdown hooks for unexpected
   434 .sp
   967 termination.
   435 The
   968 The JVM uses \f[CB]SIGHUP\f[R], \f[CB]SIGINT\f[R], and \f[CB]SIGTERM\f[R] to
   436 \fB\-enableassertions\fR
   969 initiate the running of shutdown hooks.
   437 (\fB\-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The
   970 .IP \[bu] 2
   438 \fB\-enablesystemassertions\fR
   971 Applications embedding the JVM frequently need to trap signals such as
   439 option provides a separate switch to enable assertions in all system classes\&.
   972 \f[CB]SIGINT\f[R] or \f[CB]SIGTERM\f[R], which can lead to interference with
   440 .sp
   973 the JVM signal handlers.
   441 To explicitly disable assertions in specific packages or classes, use the
   974 The \f[CB]\-Xrs\f[R] option is available to address this issue.
   442 \fB\-disableassertions\fR
   975 When \f[CB]\-Xrs\f[R] is used, the signal masks for \f[CB]SIGINT\f[R],
   443 (\fB\-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the
   976 \f[CB]SIGTERM\f[R], \f[CB]SIGHUP\f[R], and \f[CB]SIGQUIT\f[R] aren\[aq]t
   444 \fBMyClass\fR
   977 changed by the JVM, and signal handlers for these signals aren\[aq]t
   445 application with assertions enabled only in package
   978 installed.
   446 \fBcom\&.wombat\&.fruitbat\fR
   979 .RE
   447 (and any subpackages) but disabled in class
   980 .IP \[bu] 2
   448 \fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
   981 \f[B]Windows:\f[R]
   449 .sp
   982 .RS 2
   450 .if n \{\
   983 .IP \[bu] 2
   451 .RS 4
   984 The JVM watches for console control events to implement shutdown hooks
   452 .\}
   985 for unexpected termination.
       
   986 Specifically, the JVM registers a console control handler that begins
       
   987 shutdown\-hook processing and returns \f[CB]TRUE\f[R] for
       
   988 \f[CB]CTRL_C_EVENT\f[R], \f[CB]CTRL_CLOSE_EVENT\f[R],
       
   989 \f[CB]CTRL_LOGOFF_EVENT\f[R], and \f[CB]CTRL_SHUTDOWN_EVENT\f[R].
       
   990 .IP \[bu] 2
       
   991 The JVM uses a similar mechanism to implement the feature of dumping
       
   992 thread stacks for debugging purposes.
       
   993 The JVM uses \f[CB]CTRL_BREAK_EVENT\f[R] to perform thread dumps.
       
   994 .IP \[bu] 2
       
   995 If the JVM is run as a service (for example, as a servlet engine for a
       
   996 web server), then it can receive \f[CB]CTRL_LOGOFF_EVENT\f[R] but
       
   997 shouldn\[aq]t initiate shutdown because the operating system doesn\[aq]t
       
   998 actually terminate the process.
       
   999 To avoid possible interference such as this, the \f[CB]\-Xrs\f[R] option
       
  1000 can be used.
       
  1001 When the \f[CB]\-Xrs\f[R] option is used, the JVM doesn\[aq]t install a
       
  1002 console control handler, implying that it doesn\[aq]t watch for or
       
  1003 process \f[CB]CTRL_C_EVENT\f[R], \f[CB]CTRL_CLOSE_EVENT\f[R],
       
  1004 \f[CB]CTRL_LOGOFF_EVENT\f[R], or \f[CB]CTRL_SHUTDOWN_EVENT\f[R].
       
  1005 .RE
       
  1006 .PP
       
  1007 There are two consequences of specifying \f[CB]\-Xrs\f[R]:
       
  1008 .IP \[bu] 2
       
  1009 \f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]SIGQUIT\f[R] thread dumps
       
  1010 aren\[aq]t available.
       
  1011 .IP \[bu] 2
       
  1012 \f[B]Windows:\f[R] Ctrl + Break thread dumps aren\[aq]t available.
       
  1013 .PP
       
  1014 User code is responsible for causing shutdown hooks to run, for example,
       
  1015 by calling the \f[CB]System.exit()\f[R] when the JVM is to be terminated.
       
  1016 .RE
       
  1017 .TP
       
  1018 .B \f[CB]\-Xshare:\f[R]\f[I]mode\f[R]
       
  1019 Sets the class data sharing (CDS) mode.
       
  1020 .RS
       
  1021 .PP
       
  1022 Possible \f[I]mode\f[R] arguments for this option include the following:
       
  1023 .TP
       
  1024 .B \f[CB]auto\f[R]
       
  1025 Use shared class data if possible (default).
       
  1026 .RS
       
  1027 .RE
       
  1028 .TP
       
  1029 .B \f[CB]on\f[R]
       
  1030 Require using shared class data, otherwise fail.
       
  1031 .RS
       
  1032 .RE
       
  1033 .RS
       
  1034 .PP
       
  1035 \f[B]Note:\f[R] The \f[CB]\-Xshare:on\f[R] option is used for testing
       
  1036 purposes only and may cause intermittent failures due to the use of
       
  1037 address space layout randomization by the operation system.
       
  1038 This option should not be used in production environments.
       
  1039 .RE
       
  1040 .TP
       
  1041 .B \f[CB]off\f[R]
       
  1042 Do not attempt to use shared class data.
       
  1043 .RS
       
  1044 .RE
       
  1045 .RE
       
  1046 .TP
       
  1047 .B \f[CB]\-XshowSettings\f[R]
       
  1048 Shows all settings and then continues.
       
  1049 .RS
       
  1050 .RE
       
  1051 .TP
       
  1052 .B \f[CB]\-XshowSettings:\f[R]\f[I]category\f[R]
       
  1053 Shows settings and continues.
       
  1054 Possible \f[I]category\f[R] arguments for this option include the
       
  1055 following:
       
  1056 .RS
       
  1057 .TP
       
  1058 .B \f[CB]all\f[R]
       
  1059 Shows all categories of settings.
       
  1060 This is the default value.
       
  1061 .RS
       
  1062 .RE
       
  1063 .TP
       
  1064 .B \f[CB]locale\f[R]
       
  1065 Shows settings related to locale.
       
  1066 .RS
       
  1067 .RE
       
  1068 .TP
       
  1069 .B \f[CB]properties\f[R]
       
  1070 Shows settings related to system properties.
       
  1071 .RS
       
  1072 .RE
       
  1073 .TP
       
  1074 .B \f[CB]vm\f[R]
       
  1075 Shows the settings of the JVM.
       
  1076 .RS
       
  1077 .RE
       
  1078 .TP
       
  1079 .B \f[CB]system\f[R]
       
  1080 \f[B]Linux:\f[R] Shows host system or container configuration and
       
  1081 continues.
       
  1082 .RS
       
  1083 .RE
       
  1084 .RE
       
  1085 .TP
       
  1086 .B \f[CB]\-Xss\f[R] \f[I]size\f[R]
       
  1087 Sets the thread stack size (in bytes).
       
  1088 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate KB, \f[CB]m\f[R] or
       
  1089 \f[CB]M\f[R] to indicate MB, or \f[CB]g\f[R] or \f[CB]G\f[R] to indicate GB.
       
  1090 The default value depends on the platform:
       
  1091 .RS
       
  1092 .IP \[bu] 2
       
  1093 Linux/x64 (64\-bit): 1024 KB
       
  1094 .IP \[bu] 2
       
  1095 macOS (64\-bit): 1024 KB
       
  1096 .IP \[bu] 2
       
  1097 Oracle Solaris (64\-bit): 1024 KB
       
  1098 .IP \[bu] 2
       
  1099 Windows: The default value depends on virtual memory
       
  1100 .PP
       
  1101 The following examples set the thread stack size to 1024 KB in different
       
  1102 units:
       
  1103 .IP
   453 .nf
  1104 .nf
   454 \fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
  1105 \f[CB]
   455  
  1106 \-Xss1m
       
  1107 \-Xss1024k
       
  1108 \-Xss1048576
       
  1109 \f[R]
   456 .fi
  1110 .fi
   457 .if n \{\
  1111 .PP
   458 .RE
  1112 This option is similar to \f[CB]\-XX:ThreadStackSize\f[R].
   459 .\}
  1113 .RE
   460 .RE
  1114 .TP
   461 .PP
  1115 .B \f[CB]\-\-add\-reads\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])*
   462 \-enablesystemassertions
  1116 Updates \f[I]module\f[R] to read the \f[I]target\-module\f[R], regardless
   463 .br
  1117 of the module declaration.
   464 \-esa
  1118 \f[I]target\-module\f[R] can be all unnamed to read all unnamed modules.
   465 .RS 4
  1119 .RS
   466 Enables assertions in all system classes\&.
  1120 .RE
   467 .RE
  1121 .TP
   468 .PP
  1122 .B \f[CB]\-\-add\-exports\f[R] \f[I]module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])*
   469 \-help
  1123 Updates \f[I]module\f[R] to export \f[I]package\f[R] to
   470 .br
  1124 \f[I]target\-module\f[R], regardless of module declaration.
   471 \-?
  1125 The \f[I]target\-module\f[R] can be all unnamed to export to all unnamed
   472 .RS 4
  1126 modules.
   473 Displays usage information for the
  1127 .RS
   474 \fBjava\fR
  1128 .RE
   475 command without actually running the JVM\&.
  1129 .TP
   476 .RE
  1130 .B \f[CB]\-\-add\-opens\f[R] \f[I]module\f[R]\f[CB]/\f[R]\f[I]package\f[R]\f[CB]=\f[R]\f[I]target\-module\f[R](\f[CB],\f[R]\f[I]target\-module\f[R])*
   477 .PP
  1131 Updates \f[I]module\f[R] to open \f[I]package\f[R] to
   478 \-jar \fIfilename\fR
  1132 \f[I]target\-module\f[R], regardless of module declaration.
   479 .RS 4
  1133 .RS
   480 Executes a program encapsulated in a JAR file\&. The
  1134 .RE
   481 \fIfilename\fR
  1135 .TP
   482 argument is the name of a JAR file with a manifest that contains a line in the form
  1136 .B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R]
   483 \fBMain\-Class:\fR\fIclassname\fR
  1137 When present at run time, \f[CB]\-\-illegal\-access=\f[R] takes a keyword
   484 that defines the class with the
  1138 \f[I]parameter\f[R] to specify a mode of operation:
   485 \fBpublic static void main(String[] args)\fR
  1139 .RS
   486 method that serves as your application\*(Aqs starting point\&.
  1140 .RS
   487 .sp
  1141 .PP
   488 When you use the
  1142 \f[B]Note:\f[R] This option will be removed in a future release.
   489 \fB\-jar\fR
  1143 .RE
   490 option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
  1144 .IP \[bu] 2
   491 .sp
  1145 \f[CB]permit\f[R]: This mode opens each package in each module in the
   492 For more information about JAR files, see the following resources:
  1146 run\-time image to code in all unnamed modules ( such as code on the
   493 .sp
  1147 class path), if that package existed in JDK 8.
   494 .RS 4
  1148 This enables both static access, (for example, by compiled bytecode, and
   495 .ie n \{\
  1149 deep reflective access) through the platform\[aq]s various reflection
   496 \h'-04'\(bu\h'+03'\c
  1150 APIs.
   497 .\}
  1151 The first reflective\-access operation to any such package causes a
   498 .el \{\
  1152 warning to be issued.
   499 .sp -1
  1153 However, no warnings are issued after the first occurrence.
   500 .IP \(bu 2.3
  1154 This single warning describes how to enable further warnings.
   501 .\}
  1155 This mode is the default for the current JDK but will change in a future
   502 jar(1)
  1156 release.
   503 .RE
  1157 .IP \[bu] 2
   504 .sp
  1158 \f[CB]warn\f[R]: This mode is identical to \f[CB]permit\f[R] except that a
   505 .RS 4
  1159 warning message is issued for each illegal reflective\-access operation.
   506 .ie n \{\
  1160 .IP \[bu] 2
   507 \h'-04'\(bu\h'+03'\c
  1161 \f[CB]debug\f[R]: This mode is identical to \f[CB]warn\f[R] except that both
   508 .\}
  1162 a warning message and a stack trace are issued for each illegal
   509 .el \{\
  1163 reflective\-access operation.
   510 .sp -1
  1164 .IP \[bu] 2
   511 .IP \(bu 2.3
  1165 \f[CB]deny\f[R]: This mode disables all illegal\-access operations except
   512 .\}
  1166 for those enabled by other command\-line options, such as
   513 The Java Archive (JAR) Files guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jar/index\&.html
  1167 \f[CB]\-\-add\-opens\f[R].
   514 .RE
  1168 This mode will become the default in a future release.
   515 .sp
  1169 .PP
   516 .RS 4
  1170 The default mode, \f[CB]\-\-illegal\-access=permit\f[R], is intended to
   517 .ie n \{\
  1171 make you aware of code on the class path that reflectively accesses any
   518 \h'-04'\(bu\h'+03'\c
  1172 JDK\-internal APIs at least once.
   519 .\}
  1173 To learn about all such accesses, you can use the \f[CB]warn\f[R] or the
   520 .el \{\
  1174 \f[CB]debug\f[R] modes.
   521 .sp -1
  1175 For each library or framework on the class path that requires illegal
   522 .IP \(bu 2.3
  1176 access, you have two options:
   523 .\}
  1177 .IP \[bu] 2
   524 Lesson: Packaging Programs in JAR Files at
  1178 If the component\[aq]s maintainers have already released a fixed version
   525 
  1179 that no longer uses JDK\-internal APIs then you can consider upgrading
   526 http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
  1180 to that version.
   527 .RE
  1181 .IP \[bu] 2
   528 .RE
  1182 If the component still needs to be fixed, then you can contact its
   529 .PP
  1183 maintainers and ask them to replace their use of JDK\-internal APIs with
   530 \-javaagent:\fIjarpath\fR[=\fIoptions\fR]
  1184 the proper exported APIs.
   531 .RS 4
  1185 .PP
   532 Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the
  1186 If you must continue to use a component that requires illegal access,
   533 \fBjava\&.lang\&.instrument\fR
  1187 then you can eliminate the warning messages by using one or more
   534 package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
  1188 \f[CB]\-\-add\-opens\f[R] options to open only those internal packages to
   535 .RE
  1189 which access is required.
   536 .PP
  1190 .PP
   537 \-jre\-restrict\-search
  1191 To verify that your application is ready for a future version of the
   538 .RS 4
  1192 JDK, run it with \f[CB]\-\-illegal\-access=deny\f[R] along with any
   539 Includes user\-private JREs in the version search\&.
  1193 necessary \f[CB]\-\-add\-opens\f[R] options.
   540 .RE
  1194 Any remaining illegal\-access errors will most likely be due to static
   541 .PP
  1195 references from compiled code to JDK\-internal APIs.
   542 \-no\-jre\-restrict\-search
  1196 You can identify those by running the \f[B]jdeps\f[R] tool with the
   543 .RS 4
  1197 \f[CB]\-\-jdk\-internals\f[R] option.
   544 Excludes user\-private JREs from the version search\&.
  1198 For performance reasons, the current JDK does not issue warnings for
   545 .RE
  1199 illegal static\-access operations.
   546 .PP
  1200 .RE
   547 \-server
  1201 .TP
   548 .RS 4
  1202 .B \f[CB]\-\-limit\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...]
   549 Selects the Java HotSpot Server VM\&. The 64\-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
  1203 Specifies the limit of the universe of observable modules.
   550 .sp
  1204 .RS
   551 For default JVM selection, see Server\-Class Machine Detection at
  1205 .RE
   552 http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
  1206 .TP
   553 .RE
  1207 .B \f[CB]\-\-patch\-module\f[R] \f[I]module\f[R]\f[CB]=\f[R]\f[I]file\f[R](\f[CB];\f[R]\f[I]file\f[R])*
   554 .PP
  1208 Overrides or augments a module with classes and resources in JAR files
   555 \-showversion
  1209 or directories.
   556 .RS 4
  1210 .RS
   557 Displays version information and continues execution of the application\&. This option is equivalent to the
  1211 .RE
   558 \fB\-version\fR
  1212 .TP
   559 option except that the latter instructs the JVM to exit after displaying version information\&.
  1213 .B \f[CB]\-\-source\f[R] \f[I]version\f[R]
   560 .RE
  1214 Sets the version of the source in source\-file mode.
   561 .PP
  1215 .RS
   562 \-splash:\fIimgname\fR
  1216 .RE
   563 .RS 4
  1217 .SH EXTRA OPTIONS FOR MACOS
   564 Shows the splash screen with the image specified by
  1218 .PP
   565 \fIimgname\fR\&. For example, to show the
  1219 The following extra options are macOS specific.
   566 \fBsplash\&.gif\fR
  1220 .TP
   567 file from the
  1221 .B \f[CB]\-XstartOnFirstThread\f[R]
   568 \fBimages\fR
  1222 Runs the \f[CB]main()\f[R] method on the first (AppKit) thread.
   569 directory when starting your application, use the following option:
  1223 .RS
   570 .sp
  1224 .RE
   571 .if n \{\
  1225 .TP
   572 .RS 4
  1226 .B \f[CB]\-Xdock:name=\f[R]\f[I]application_name\f[R]
   573 .\}
  1227 Overrides the default application name displayed in dock.
       
  1228 .RS
       
  1229 .RE
       
  1230 .TP
       
  1231 .B \f[CB]\-Xdock:icon=\f[R]\f[I]path_to_icon_file\f[R]
       
  1232 Overrides the default icon displayed in dock.
       
  1233 .RS
       
  1234 .RE
       
  1235 .SH ADVANCED OPTIONS FOR JAVA
       
  1236 .PP
       
  1237 These \f[CB]java\f[R] options can be used to enable other advanced
       
  1238 options.
       
  1239 .TP
       
  1240 .B \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R]
       
  1241 Unlocks the options intended for diagnosing the JVM.
       
  1242 By default, this option is disabled and diagnostic options aren\[aq]t
       
  1243 available.
       
  1244 .RS
       
  1245 .PP
       
  1246 Command line options that are enabled with the use of this option are
       
  1247 not supported.
       
  1248 If you encounter issues while using any of these options, it is very
       
  1249 likely that you will be required to reproduce the problem without using
       
  1250 any of these unsupported options before Oracle Support can assist with
       
  1251 an investigation.
       
  1252 It is also possible that any of these options may be removed or their
       
  1253 behavior changed without any warning.
       
  1254 .RE
       
  1255 .TP
       
  1256 .B \f[CB]\-XX:+UnlockExperimentalVMOptions\f[R]
       
  1257 Unlocks the options that provide experimental features in the JVM.
       
  1258 By default, this option is disabled and experimental features aren\[aq]t
       
  1259 available.
       
  1260 .RS
       
  1261 .RE
       
  1262 .SH ADVANCED RUNTIME OPTIONS FOR JAVA
       
  1263 .PP
       
  1264 These \f[CB]java\f[R] options control the runtime behavior of the Java
       
  1265 HotSpot VM.
       
  1266 .TP
       
  1267 .B \f[CB]\-XX:ActiveProcessorCount=\f[R]\f[I]x\f[R]
       
  1268 Overrides the number of CPUs that the VM will use to calculate the size
       
  1269 of thread pools it will use for various operations such as Garbage
       
  1270 Collection and ForkJoinPool.
       
  1271 .RS
       
  1272 .PP
       
  1273 The VM normally determines the number of available processors from the
       
  1274 operating system.
       
  1275 This flag can be useful for partitioning CPU resources when running
       
  1276 multiple Java processes in docker containers.
       
  1277 This flag is honored even if \f[CB]UseContainerSupport\f[R] is not
       
  1278 enabled.
       
  1279 See \f[CB]\-XX:\-UseContainerSupport\f[R] for a description of enabling
       
  1280 and disabling container support.
       
  1281 .RE
       
  1282 .TP
       
  1283 .B \f[CB]\-XX:AllocateHeapAt=\f[R]\f[I]path\f[R]
       
  1284 Takes a path to the file system and uses memory mapping to allocate the
       
  1285 object heap on the memory device.
       
  1286 Using this option enables the HotSpot VM to allocate the Java object
       
  1287 heap on an alternative memory device, such as an NV\-DIMM, specified by
       
  1288 the user.
       
  1289 .RS
       
  1290 .PP
       
  1291 Alternative memory devices that have the same semantics as DRAM,
       
  1292 including the semantics of atomic operations, can be used instead of
       
  1293 DRAM for the object heap without changing the existing application code.
       
  1294 All other memory structures (such as the code heap, metaspace, and
       
  1295 thread stacks) continue to reside in DRAM.
       
  1296 .PP
       
  1297 Some operating systems expose non\-DRAM memory through the file system.
       
  1298 Memory\-mapped files in these file systems bypass the page cache and
       
  1299 provide a direct mapping of virtual memory to the physical memory on the
       
  1300 device.
       
  1301 The existing heap related flags (such as \f[CB]\-Xmx\f[R] and
       
  1302 \f[CB]\-Xms\f[R]) and garbage\-collection related flags continue to work
       
  1303 as before.
       
  1304 .RE
       
  1305 .TP
       
  1306 .B \f[CB]\-XX:\-CompactStrings\f[R]
       
  1307 Disables the Compact Strings feature.
       
  1308 By default, this option is enabled.
       
  1309 When this option is enabled, Java Strings containing only single\-byte
       
  1310 characters are internally represented and stored as
       
  1311 single\-byte\-per\-character Strings using ISO\-8859\-1 / Latin\-1
       
  1312 encoding.
       
  1313 This reduces, by 50%, the amount of space required for Strings
       
  1314 containing only single\-byte characters.
       
  1315 For Java Strings containing at least one multibyte character: these are
       
  1316 represented and stored as 2 bytes per character using UTF\-16 encoding.
       
  1317 Disabling the Compact Strings feature forces the use of UTF\-16 encoding
       
  1318 as the internal representation for all Java Strings.
       
  1319 .RS
       
  1320 .PP
       
  1321 Cases where it may be beneficial to disable Compact Strings include the
       
  1322 following:
       
  1323 .IP \[bu] 2
       
  1324 When it\[aq]s known that an application overwhelmingly will be
       
  1325 allocating multibyte character Strings
       
  1326 .IP \[bu] 2
       
  1327 In the unexpected event where a performance regression is observed in
       
  1328 migrating from Java SE 8 to Java SE 9 and an analysis shows that Compact
       
  1329 Strings introduces the regression
       
  1330 .PP
       
  1331 In both of these scenarios, disabling Compact Strings makes sense.
       
  1332 .RE
       
  1333 .TP
       
  1334 .B \f[CB]\-XX:ErrorFile=\f[R]\f[I]filename\f[R]
       
  1335 Specifies the path and file name to which error data is written when an
       
  1336 irrecoverable error occurs.
       
  1337 By default, this file is created in the current working directory and
       
  1338 named \f[CB]hs_err_pid\f[R]\f[I]pid\f[R]\f[CB]\&.log\f[R] where \f[I]pid\f[R]
       
  1339 is the identifier of the process that encountered the error.
       
  1340 .RS
       
  1341 .PP
       
  1342 The following example shows how to set the default log file (note that
       
  1343 the identifier of the process is specified as \f[CB]%p\f[R]):
       
  1344 .RS
       
  1345 .PP
       
  1346 \f[CB]\-XX:ErrorFile=./hs_err_pid%p.log\f[R]
       
  1347 .RE
       
  1348 .IP \[bu] 2
       
  1349 \f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
       
  1350 how to set the error log to \f[CB]/var/log/java/java_error.log\f[R]:
       
  1351 .RS 2
       
  1352 .RS
       
  1353 .PP
       
  1354 \f[CB]\-XX:ErrorFile=/var/log/java/java_error.log\f[R]
       
  1355 .RE
       
  1356 .RE
       
  1357 .IP \[bu] 2
       
  1358 \f[B]Windows:\f[R] The following example shows how to set the error log
       
  1359 file to \f[CB]C:/log/java/java_error.log\f[R]:
       
  1360 .RS 2
       
  1361 .RS
       
  1362 .PP
       
  1363 \f[CB]\-XX:ErrorFile=C:/log/java/java_error.log\f[R]
       
  1364 .RE
       
  1365 .RE
       
  1366 .PP
       
  1367 If the file exists, and is writeable, then it will be overwritten.
       
  1368 Otherwise, if the file can\[aq]t be created in the specified directory
       
  1369 (due to insufficient space, permission problem, or another issue), then
       
  1370 the file is created in the temporary directory for the operating system:
       
  1371 .IP \[bu] 2
       
  1372 \f[B]Oracle Solaris, Linux, and macOS:\f[R] The temporary directory is
       
  1373 \f[CB]/tmp\f[R].
       
  1374 .IP \[bu] 2
       
  1375 \f[B]Windows:\f[R] The temporary directory is specified by the value of
       
  1376 the \f[CB]TMP\f[R] environment variable; if that environment variable
       
  1377 isn\[aq]t defined, then the value of the \f[CB]TEMP\f[R] environment
       
  1378 variable is used.
       
  1379 .RE
       
  1380 .TP
       
  1381 .B \f[CB]\-XX:+ExtensiveErrorReports\f[R]
       
  1382 Enables the reporting of more extensive error information in the
       
  1383 \f[CB]ErrorFile\f[R].
       
  1384 This option can be turned on in environments where maximal information
       
  1385 is desired \- even if the resulting logs may be quite large and/or
       
  1386 contain information that might be considered sensitive.
       
  1387 The information can vary from release to release, and across different
       
  1388 platforms.
       
  1389 By default this option is disabled.
       
  1390 .RS
       
  1391 .RE
       
  1392 .TP
       
  1393 .B \f[CB]\-XX:FlightRecorderOptions=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] (or)\f[CB]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
       
  1394 Sets the parameters that control the behavior of JFR.
       
  1395 .RS
       
  1396 .PP
       
  1397 The following list contains the available JFR
       
  1398 \f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] entries:
       
  1399 .TP
       
  1400 .B \f[CB]globalbuffersize=\f[R]\f[I]size\f[R]
       
  1401 Specifies the total amount of primary memory used for data retention.
       
  1402 The default value is based on the value specified for
       
  1403 \f[CB]memorysize\f[R].
       
  1404 Change the \f[CB]memorysize\f[R] parameter to alter the size of global
       
  1405 buffers.
       
  1406 .RS
       
  1407 .RE
       
  1408 .TP
       
  1409 .B \f[CB]maxchunksize=\f[R]\f[I]size\f[R]
       
  1410 Specifies the maximum size (in bytes) of the data chunks in a recording.
       
  1411 Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes (MB),
       
  1412 or \f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes (GB).
       
  1413 By default, the maximum size of data chunks is set to 12 MB.
       
  1414 The minimum allowed is 1 MB.
       
  1415 .RS
       
  1416 .RE
       
  1417 .TP
       
  1418 .B \f[CB]memorysize=\f[R]\f[I]size\f[R]
       
  1419 Determines how much buffer memory should be used, and sets the
       
  1420 \f[CB]globalbuffersize\f[R] and \f[CB]numglobalbuffers\f[R] parameters based
       
  1421 on the size specified.
       
  1422 Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes (MB),
       
  1423 or \f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes (GB).
       
  1424 By default, the memory size is set to 10 MB.
       
  1425 .RS
       
  1426 .RE
       
  1427 .TP
       
  1428 .B \f[CB]numglobalbuffers\f[R]
       
  1429 Specifies the number of global buffers used.
       
  1430 The default value is based on the memory size specified.
       
  1431 Change the \f[CB]memorysize\f[R] parameter to alter the number of global
       
  1432 buffers.
       
  1433 .RS
       
  1434 .RE
       
  1435 .TP
       
  1436 .B \f[CB]old\-object\-queue\-size=number\-of\-objects\f[R]
       
  1437 Maximum number of old objects to track.
       
  1438 By default, the number of objects is set to 256.
       
  1439 .RS
       
  1440 .RE
       
  1441 .TP
       
  1442 .B \f[CB]repository=\f[R]\f[I]path\f[R]
       
  1443 Specifies the repository (a directory) for temporary disk storage.
       
  1444 By default, the system\[aq]s temporary directory is used.
       
  1445 .RS
       
  1446 .RE
       
  1447 .TP
       
  1448 .B \f[CB]retransform=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}
       
  1449 Specifies whether event classes should be retransformed using JVMTI.
       
  1450 If false, instrumentation is added when event classes are loaded.
       
  1451 By default, this parameter is enabled.
       
  1452 .RS
       
  1453 .RE
       
  1454 .TP
       
  1455 .B \f[CB]samplethreads=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}
       
  1456 Specifies whether thread sampling is enabled.
       
  1457 Thread sampling occurs only if the sampling event is enabled along with
       
  1458 this parameter.
       
  1459 By default, this parameter is enabled.
       
  1460 .RS
       
  1461 .RE
       
  1462 .TP
       
  1463 .B \f[CB]stackdepth=\f[R]\f[I]depth\f[R]
       
  1464 Stack depth for stack traces.
       
  1465 By default, the depth is set to 64 method calls.
       
  1466 The maximum is 2048.
       
  1467 Values greater than 64 could create significant overhead and reduce
       
  1468 performance.
       
  1469 .RS
       
  1470 .RE
       
  1471 .TP
       
  1472 .B \f[CB]threadbuffersize=\f[R]\f[I]size\f[R]
       
  1473 Specifies the per\-thread local buffer size (in bytes).
       
  1474 By default, the local buffer size is set to 8 kilobytes, with a minimum
       
  1475 value of 4 kilobytes.
       
  1476 Overriding this parameter could reduce performance and is not
       
  1477 recommended.
       
  1478 .RS
       
  1479 .RE
       
  1480 .PP
       
  1481 You can specify values for multiple parameters by separating them with a
       
  1482 comma.
       
  1483 .RE
       
  1484 .TP
       
  1485 .B \f[CB]\-XX:LargePageSizeInBytes=\f[R]\f[I]size\f[R]
       
  1486 Sets the maximum size (in bytes) for large pages used for the Java heap.
       
  1487 The \f[I]size\f[R] argument must be a power of 2 (2, 4, 8, 16, and so
       
  1488 on).
       
  1489 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  1490 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  1491 \f[CB]G\f[R] to indicate gigabytes.
       
  1492 By default, the size is set to 0, meaning that the JVM chooses the size
       
  1493 for large pages automatically.
       
  1494 See \f[B]Large Pages\f[R].
       
  1495 .RS
       
  1496 .PP
       
  1497 The following example describes how to set the large page size to 4
       
  1498 megabytes (MB):
       
  1499 .RS
       
  1500 .PP
       
  1501 \f[CB]\-XX:LargePageSizeInBytes=4m\f[R]
       
  1502 .RE
       
  1503 .RE
       
  1504 .TP
       
  1505 .B \f[CB]\-XX:MaxDirectMemorySize=\f[R]\f[I]size\f[R]
       
  1506 Sets the maximum total size (in bytes) of the \f[CB]java.nio\f[R] package,
       
  1507 direct\-buffer allocations.
       
  1508 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  1509 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  1510 \f[CB]G\f[R] to indicate gigabytes.
       
  1511 By default, the size is set to 0, meaning that the JVM chooses the size
       
  1512 for NIO direct\-buffer allocations automatically.
       
  1513 .RS
       
  1514 .PP
       
  1515 The following examples illustrate how to set the NIO size to 1024 KB in
       
  1516 different units:
       
  1517 .IP
   574 .nf
  1518 .nf
   575 \fB\-splash:images/splash\&.gif\fR
  1519 \f[CB]
   576  
  1520 \-XX:MaxDirectMemorySize=1m
       
  1521 \-XX:MaxDirectMemorySize=1024k
       
  1522 \-XX:MaxDirectMemorySize=1048576
       
  1523 \f[R]
   577 .fi
  1524 .fi
   578 .if n \{\
  1525 .RE
   579 .RE
  1526 .TP
   580 .\}
  1527 .B \f[CB]\-XX:\-MaxFDLimit\f[R]
   581 .RE
  1528 Disables the attempt to set the soft limit for the number of open file
   582 .PP
  1529 descriptors to the hard limit.
   583 \-verbose:class
  1530 By default, this option is enabled on all platforms, but is ignored on
   584 .RS 4
  1531 Windows.
   585 Displays information about each loaded class\&.
  1532 The only time that you may need to disable this is on Mac OS, where its
   586 .RE
  1533 use imposes a maximum of 10240, which is lower than the actual system
   587 .PP
  1534 maximum.
   588 \-verbose:gc
  1535 .RS
   589 .RS 4
  1536 .RE
   590 Displays information about each garbage collection (GC) event\&.
  1537 .TP
   591 .RE
  1538 .B \f[CB]\-XX:NativeMemoryTracking=\f[R]\f[I]mode\f[R]
   592 .PP
  1539 Specifies the mode for tracking JVM native memory usage.
   593 \-verbose:jni
  1540 Possible \f[I]mode\f[R] arguments for this option include the following:
   594 .RS 4
  1541 .RS
   595 Displays information about the use of native methods and other Java Native Interface (JNI) activity\&.
  1542 .TP
   596 .RE
  1543 .B \f[CB]off\f[R]
   597 .PP
  1544 Instructs not to track JVM native memory usage.
   598 \-version
  1545 This is the default behavior if you don\[aq]t specify the
   599 .RS 4
  1546 \f[CB]\-XX:NativeMemoryTracking\f[R] option.
   600 Displays version information and then exits\&. This option is equivalent to the
  1547 .RS
   601 \fB\-showversion\fR
  1548 .RE
   602 option except that the latter does not instruct the JVM to exit after displaying version information\&.
  1549 .TP
   603 .RE
  1550 .B \f[CB]summary\f[R]
   604 .PP
  1551 Tracks memory usage only by JVM subsystems, such as Java heap, class,
   605 \-version:\fIrelease\fR
  1552 code, and thread.
   606 .RS 4
  1553 .RS
   607 Specifies the release version to be used for running the application\&. If the version of the
  1554 .RE
   608 \fBjava\fR
  1555 .TP
   609 command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
  1556 .B \f[CB]detail\f[R]
   610 .sp
  1557 In addition to tracking memory usage by JVM subsystems, track memory
   611 The
  1558 usage by individual \f[CB]CallSite\f[R], individual virtual memory region
   612 \fIrelease\fR
  1559 and its committed regions.
   613 argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A
  1560 .RS
   614 \fIversion string\fR
  1561 .RE
   615 is the developer designation of the version number in the following form:
  1562 .RE
   616 \fB1\&.\fR\fIx\fR\fB\&.0_\fR\fIu\fR
  1563 .TP
   617 (where
  1564 .B \f[CB]\-XX:ObjectAlignmentInBytes=\f[R]\f[I]alignment\f[R]
   618 \fIx\fR
  1565 Sets the memory alignment of Java objects (in bytes).
   619 is the major version number, and
  1566 By default, the value is set to 8 bytes.
   620 \fIu\fR
  1567 The specified value should be a power of 2, and must be within the range
   621 is the update version number)\&. A
  1568 of 8 and 256 (inclusive).
   622 \fIversion range\fR
  1569 This option makes it possible to use compressed pointers with large Java
   623 is made up of a version string followed by a plus sign (\fB+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\fB*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical
  1570 heap sizes.
   624 \fIOR\fR
  1571 .RS
   625 combination, or an ampersand (\fB&\fR) for a logical
  1572 .PP
   626 \fIAND\fR
  1573 The heap size limit in bytes is calculated as:
   627 combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
  1574 .RS
   628 .sp
  1575 .PP
   629 .if n \{\
  1576 \f[CB]4GB\ *\ ObjectAlignmentInBytes\f[R]
   630 .RS 4
  1577 .RE
   631 .\}
  1578 .RS
       
  1579 .PP
       
  1580 \f[B]Note:\f[R] As the alignment value increases, the unused space
       
  1581 between objects also increases.
       
  1582 As a result, you may not realize any benefits from using compressed
       
  1583 pointers with large Java heap sizes.
       
  1584 .RE
       
  1585 .RE
       
  1586 .TP
       
  1587 .B \f[CB]\-XX:OnError=\f[R]\f[I]string\f[R]
       
  1588 Sets a custom command or a series of semicolon\-separated commands to
       
  1589 run when an irrecoverable error occurs.
       
  1590 If the string contains spaces, then it must be enclosed in quotation
       
  1591 marks.
       
  1592 .RS
       
  1593 .IP \[bu] 2
       
  1594 \f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
       
  1595 how the \f[CB]\-XX:OnError\f[R] option can be used to run the
       
  1596 \f[CB]gcore\f[R] command to create a core image, and start the
       
  1597 \f[CB]gdb\f[R] debugger to attach to the process in case of an
       
  1598 irrecoverable error (the \f[CB]%p\f[R] designates the current process
       
  1599 identifier):
       
  1600 .RS 2
       
  1601 .RS
       
  1602 .PP
       
  1603 \f[CB]\-XX:OnError="gcore\ %p;gdb\ \-p\ %p"\f[R]
       
  1604 .RE
       
  1605 .RE
       
  1606 .IP \[bu] 2
       
  1607 \f[B]Windows:\f[R] The following example shows how the
       
  1608 \f[CB]\-XX:OnError\f[R] option can be used to run the
       
  1609 \f[CB]userdump.exe\f[R] utility to obtain a crash dump in case of an
       
  1610 irrecoverable error (the \f[CB]%p\f[R] designates the current process
       
  1611 identifier).
       
  1612 This example assumes that the path to the \f[CB]userdump.exe\f[R] utility
       
  1613 is specified in the \f[CB]PATH\f[R] environment variable:
       
  1614 .RS 2
       
  1615 .RS
       
  1616 .PP
       
  1617 \f[CB]\-XX:OnError="userdump.exe\ %p"\f[R]
       
  1618 .RE
       
  1619 .RE
       
  1620 .RE
       
  1621 .TP
       
  1622 .B \f[CB]\-XX:OnOutOfMemoryError=\f[R]\f[I]string\f[R]
       
  1623 Sets a custom command or a series of semicolon\-separated commands to
       
  1624 run when an \f[CB]OutOfMemoryError\f[R] exception is first thrown.
       
  1625 If the string contains spaces, then it must be enclosed in quotation
       
  1626 marks.
       
  1627 For an example of a command string, see the description of the
       
  1628 \f[CB]\-XX:OnError\f[R] option.
       
  1629 .RS
       
  1630 .RE
       
  1631 .TP
       
  1632 .B \f[CB]\-XX:+PrintCommandLineFlags\f[R]
       
  1633 Enables printing of ergonomically selected JVM flags that appeared on
       
  1634 the command line.
       
  1635 It can be useful to know the ergonomic values set by the JVM, such as
       
  1636 the heap space size and the selected garbage collector.
       
  1637 By default, this option is disabled and flags aren\[aq]t printed.
       
  1638 .RS
       
  1639 .RE
       
  1640 .TP
       
  1641 .B \f[CB]\-XX:+PreserveFramePointer\f[R]
       
  1642 Selects between using the RBP register as a general purpose register
       
  1643 (\f[CB]\-XX:\-PreserveFramePointer\f[R]) and using the RBP register to
       
  1644 hold the frame pointer of the currently executing method
       
  1645 (\f[CB]\-XX:+PreserveFramePointer\f[R] .
       
  1646 If the frame pointer is available, then external profiling tools\ (for
       
  1647 example, Linux perf) can construct more accurate stack traces.
       
  1648 .RS
       
  1649 .RE
       
  1650 .TP
       
  1651 .B \f[CB]\-XX:+PrintNMTStatistics\f[R]
       
  1652 Enables printing of collected native memory tracking data at JVM exit
       
  1653 when native memory tracking is enabled (see
       
  1654 \f[CB]\-XX:NativeMemoryTracking\f[R]).
       
  1655 By default, this option is disabled and native memory tracking data
       
  1656 isn\[aq]t printed.
       
  1657 .RS
       
  1658 .RE
       
  1659 .TP
       
  1660 .B \f[CB]\-XX:SharedArchiveFile=\f[R]\f[I]path\f[R]
       
  1661 Specifies the path and name of the class data sharing (CDS) archive file
       
  1662 .RS
       
  1663 .PP
       
  1664 See \f[B]Application Class Data Sharing\f[R].
       
  1665 .RE
       
  1666 .TP
       
  1667 .B \f[CB]\-XX:SharedArchiveConfigFile\f[R]=\f[I]shared_config_file\f[R]
       
  1668 Specifies additional shared data added to the archive file.
       
  1669 .RS
       
  1670 .RE
       
  1671 .TP
       
  1672 .B \f[CB]\-XX:SharedClassListFile=\f[R]\f[I]file_name\f[R]
       
  1673 Specifies the text file that contains the names of the classes to store
       
  1674 in the class data sharing (CDS) archive.
       
  1675 This file contains the full name of one class per line, except slashes
       
  1676 (\f[CB]/\f[R]) replace dots (\f[CB]\&.\f[R]).
       
  1677 For example, to specify the classes \f[CB]java.lang.Object\f[R] and
       
  1678 \f[CB]hello.Main\f[R], create a text file that contains the following two
       
  1679 lines:
       
  1680 .RS
       
  1681 .IP
   632 .nf
  1682 .nf
   633 \fB\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fR
  1683 \f[CB]
   634  
  1684 java/lang/Object
       
  1685 hello/Main
       
  1686 \f[R]
   635 .fi
  1687 .fi
   636 .if n \{\
  1688 .PP
   637 .RE
  1689 The classes that you specify in this text file should include the
   638 .\}
  1690 classes that are commonly used by the application.
   639 Quotation marks are necessary only if there are spaces in the
  1691 They may include any classes from the application, extension, or
   640 \fIrelease\fR
  1692 bootstrap class paths.
   641 parameter\&.
  1693 .PP
   642 .sp
  1694 See \f[B]Application Class Data Sharing\f[R].
   643 For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line\&.
  1695 .RE
   644 .RE
  1696 .TP
   645 .SS "Non\-Standard Options"
  1697 .B \f[CB]\-XX:+ShowMessageBoxOnError\f[R]
   646 .PP
  1698 Enables the display of a dialog box when the JVM experiences an
   647 These options are general purpose options that are specific to the Java HotSpot Virtual Machine\&.
  1699 irrecoverable error.
   648 .PP
  1700 This prevents the JVM from exiting and keeps the process active so that
   649 \-X
  1701 you can attach a debugger to it to investigate the cause of the error.
   650 .RS 4
  1702 By default, this option is disabled.
   651 Displays help for all available
  1703 .RS
   652 \fB\-X\fR
  1704 .RE
   653 options\&.
  1705 .TP
   654 .RE
  1706 .B \f[CB]\-XX:StartFlightRecording=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
   655 .PP
  1707 Starts a JFR recording for the Java application.
   656 \-Xbatch
  1708 This option is equivalent to the \f[CB]JFR.start\f[R] diagnostic command
   657 .RS 4
  1709 that starts a recording during runtime.
   658 Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The
  1710 You can set the following \f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
   659 \fB\-Xbatch\fR
  1711 entries when starting a JFR recording:
   660 flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
  1712 .RS
   661 .sp
  1713 .TP
   662 This option is equivalent to
  1714 .B \f[CB]delay=\f[R]\f[I]time\f[R]
   663 \fB\-XX:\-BackgroundCompilation\fR\&.
  1715 Specifies the delay between the Java application launch time and the
   664 .RE
  1716 start of the recording.
   665 .PP
  1717 Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for
   666 \-Xbootclasspath:\fIpath\fR
  1718 minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example,
   667 .RS 4
  1719 specifying \f[CB]10m\f[R] means 10 minutes).
   668 Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to search for boot class files\&. These are used in place of the boot class files included in the JDK\&.
  1720 By default, there\[aq]s no delay, and this parameter is set to 0.
   669 .sp
  1721 .RS
   670 Do not deploy applications that use this option to override a class in
  1722 .RE
   671 \fBrt\&.jar\fR, because this violates the JRE binary code license\&.
  1723 .TP
   672 .RE
  1724 .B \f[CB]disk=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}
   673 .PP
  1725 Specifies whether to write data to disk while recording.
   674 \-Xbootclasspath/a:\fIpath\fR
  1726 By default, this parameter is enabled.
   675 .RS 4
  1727 .RS
   676 Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to append to the end of the default bootstrap class path\&.
  1728 .RE
   677 .sp
  1729 .TP
   678 Do not deploy applications that use this option to override a class in
  1730 .B \f[CB]dumponexit=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}
   679 \fBrt\&.jar\fR, because this violates the JRE binary code license\&.
  1731 Specifies if the running recording is dumped when the JVM shuts down.
   680 .RE
  1732 If enabled and a \f[CB]filename\f[R] is not entered, the recording is
   681 .PP
  1733 written to a file in the directory where the process was started.
   682 \-Xbootclasspath/p:\fIpath\fR
  1734 The file name is a system\-generated name that contains the process ID,
   683 .RS 4
  1735 recording ID, and current timestamp, similar to
   684 Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to prepend to the front of the default bootstrap class path\&.
  1736 \f[CB]hotspot\-pid\-47496\-id\-1\-2018_01_25_19_10_41.jfr\f[R].
   685 .sp
  1737 By default, this parameter is disabled.
   686 Do not deploy applications that use this option to override a class in
  1738 .RS
   687 \fBrt\&.jar\fR, because this violates the JRE binary code license\&.
  1739 .RE
   688 .RE
  1740 .TP
   689 .PP
  1741 .B \f[CB]duration=\f[R]\f[I]time\f[R]
   690 \-Xcheck:jni
  1742 Specifies the duration of the recording.
   691 .RS 4
  1743 Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for
   692 Performs additional checks for Java Native Interface (JNI) functions\&. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request\&. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases\&. Expect a performance degradation when this option is used\&.
  1744 minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example,
   693 .RE
  1745 specifying \f[CB]5h\f[R] means 5 hours).
   694 .PP
  1746 By default, the duration isn\[aq]t limited, and this parameter is set to
   695 \-Xcomp
  1747 0.
   696 .RS 4
  1748 .RS
   697 Forces compilation of methods on first invocation\&. By default, the Client VM (\fB\-client\fR) performs 1,000 interpreted method invocations and the Server VM (\fB\-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the
  1749 .RE
   698 \fB\-Xcomp\fR
  1750 .TP
   699 option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
  1751 .B \f[CB]filename=\f[R]\f[I]path\f[R]
   700 .sp
  1752 Specifies the path and name of the file to which the recording is
   701 You can also change the number of interpreted method invocations before compilation using the
  1753 written when the recording is stopped, for example:
   702 \fB\-XX:CompileThreshold\fR
  1754 .RS
   703 option\&.
  1755 .IP \[bu] 2
   704 .RE
  1756 \f[CB]recording.jfr\f[R]
   705 .PP
  1757 .IP \[bu] 2
   706 \-Xdebug
  1758 \f[CB]/home/user/recordings/recording.jfr\f[R]
   707 .RS 4
  1759 .IP \[bu] 2
   708 Does nothing\&. Provided for backward compatibility\&.
  1760 \f[CB]c:\\recordings\\recording.jfr\f[R]
   709 .RE
  1761 .RE
   710 .PP
  1762 .TP
   711 \-Xdiag
  1763 .B \f[CB]name=\f[R]\f[I]identifier\f[R]
   712 .RS 4
  1764 Takes both the name and the identifier of a recording.
   713 Shows additional diagnostic messages\&.
  1765 .RS
   714 .RE
  1766 .RE
   715 .PP
  1767 .TP
   716 \-Xfuture
  1768 .B \f[CB]maxage=\f[R]\f[I]time\f[R]
   717 .RS 4
  1769 Specifies the maximum age of disk data to keep for the recording.
   718 Enables strict class\-file format checks that enforce close conformance to the class\-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
  1770 This parameter is valid only when the \f[CB]disk\f[R] parameter is set to
   719 .sp
  1771 \f[CB]true\f[R].
   720 This option is deprecated and may be removed in a future release.
  1772 Append \f[CB]s\f[R] to specify the time in seconds, \f[CB]m\f[R] for
   721 .RE
  1773 minutes, \f[CB]h\f[R] for hours, or \f[CB]d\f[R] for days (for example,
   722 .PP
  1774 specifying \f[CB]30s\f[R] means 30 seconds).
   723 \-Xint
  1775 By default, the maximum age isn\[aq]t limited, and this parameter is set
   724 .RS 4
  1776 to \f[CB]0s\f[R].
   725 Runs the application in interpreted\-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
  1777 .RS
   726 .RE
  1778 .RE
   727 .PP
  1779 .TP
   728 \-Xinternalversion
  1780 .B \f[CB]maxsize=\f[R]\f[I]size\f[R]
   729 .RS 4
  1781 Specifies the maximum size (in bytes) of disk data to keep for the
   730 Displays more detailed JVM version information than the
  1782 recording.
   731 \fB\-version\fR
  1783 This parameter is valid only when the \f[CB]disk\f[R] parameter is set to
   732 option, and then exits\&.
  1784 \f[CB]true\f[R].
   733 .RE
  1785 The value must not be less than the value for the \f[CB]maxchunksize\f[R]
   734 .PP
  1786 parameter set with \f[CB]\-XX:FlightRecorderOptions\f[R].
   735 \-Xloggc:\fIfilename\fR
  1787 Append \f[CB]m\f[R] or \f[CB]M\f[R] to specify the size in megabytes, or
   736 .RS 4
  1788 \f[CB]g\f[R] or \f[CB]G\f[R] to specify the size in gigabytes.
   737 Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of
  1789 By default, the maximum size of disk data isn\[aq]t limited, and this
   738 \fB\-verbose:gc\fR
  1790 parameter is set to \f[CB]0\f[R].
   739 with the time elapsed since the first GC event preceding each logged event\&. The
  1791 .RS
   740 \fB\-Xloggc\fR
  1792 .RE
   741 option overrides
  1793 .TP
   742 \fB\-verbose:gc\fR
  1794 .B \f[CB]path\-to\-gc\-roots=\f[R]{\f[CB]true\f[R]|\f[CB]false\f[R]}
   743 if both are given with the same
  1795 Specifies whether to collect the path to garbage collection (GC) roots
   744 \fBjava\fR
  1796 at the end of a recording.
   745 command\&.
  1797 By default, this parameter is disabled.
   746 .sp
  1798 .RS
       
  1799 .PP
       
  1800 The path to GC roots is useful for finding memory leaks, but collecting
       
  1801 it is time\-consuming.
       
  1802 Enable this option only when you start a recording for an application
       
  1803 that you suspect has a memory leak.
       
  1804 If the \f[CB]settings\f[R] parameter is set to \f[CB]profile\f[R], the stack
       
  1805 trace from where the potential leaking object was allocated is included
       
  1806 in the information collected.
       
  1807 .RE
       
  1808 .TP
       
  1809 .B \f[CB]settings=\f[R]\f[I]path\f[R]
       
  1810 Specifies the path and name of the event settings file (of type JFC).
       
  1811 By default, the \f[CB]default.jfc\f[R] file is used, which is located in
       
  1812 \f[CB]JRE_HOME/lib/jfr\f[R].
       
  1813 This default settings file collects a predefined set of information with
       
  1814 low overhead, so it has minimal impact on performance and can be used
       
  1815 with recordings that run continuously.
       
  1816 .RS
       
  1817 .PP
       
  1818 A second settings file is also provided, profile.jfc, which provides
       
  1819 more data than the default configuration, but can have more overhead and
       
  1820 impact performance.
       
  1821 Use this configuration for short periods of time when more information
       
  1822 is needed.
       
  1823 .RE
       
  1824 .PP
       
  1825 You can specify values for multiple parameters by separating them with a
       
  1826 comma.
       
  1827 .RE
       
  1828 .TP
       
  1829 .B \f[CB]\-XX:ThreadStackSize=\f[R]\f[I]size\f[R]
       
  1830 Sets the Java thread stack size (in kilobytes).
       
  1831 Use of a scaling suffix, such as \f[CB]k\f[R], results in the scaling of
       
  1832 the kilobytes value so that \f[CB]\-XX:ThreadStackSize=1k\f[R] sets the
       
  1833 Java thread stack size\ to 1024*1024 bytes or 1 megabyte.
       
  1834 The default value depends on the platform:
       
  1835 .RS
       
  1836 .IP \[bu] 2
       
  1837 Linux/x64 (64\-bit): 1024 KB
       
  1838 .IP \[bu] 2
       
  1839 macOS (64\-bit): 1024 KB
       
  1840 .IP \[bu] 2
       
  1841 Oracle Solaris (64\-bit): 1024 KB
       
  1842 .IP \[bu] 2
       
  1843 Windows: The default value depends on virtual memory
       
  1844 .PP
       
  1845 The following examples show how to set the thread stack size to 1
       
  1846 megabyte in different units:
       
  1847 .IP
       
  1848 .nf
       
  1849 \f[CB]
       
  1850 \-XX:ThreadStackSize=1k
       
  1851 \-XX:ThreadStackSize=1024
       
  1852 \f[R]
       
  1853 .fi
       
  1854 .PP
       
  1855 This option is similar to \f[CB]\-Xss\f[R].
       
  1856 .RE
       
  1857 .TP
       
  1858 .B \f[CB]\-XX:\-UseBiasedLocking\f[R]
       
  1859 Disables the use of biased locking.
       
  1860 Some applications with significant amounts of uncontended
       
  1861 synchronization may attain significant speedups with this flag enabled,
       
  1862 but applications with certain patterns of locking may see slowdowns.
       
  1863 \&.
       
  1864 .RS
       
  1865 .PP
       
  1866 By default, this option is enabled.
       
  1867 .RE
       
  1868 .TP
       
  1869 .B \f[CB]\-XX:\-UseCompressedOops\f[R]
       
  1870 Disables the use of compressed pointers.
       
  1871 By default, this option is enabled, and compressed pointers are used.
       
  1872 This will automatically limit the maximum ergonomically determined Java
       
  1873 heap size to the maximum amount of memory that can be covered by
       
  1874 compressed pointers.
       
  1875 By default this range is 32 GB.
       
  1876 .RS
       
  1877 .PP
       
  1878 With compressed oops enabled, object references are represented as
       
  1879 32\-bit offsets instead of 64\-bit pointers, which typically increases
       
  1880 performance when running the application with Java heap sizes smaller
       
  1881 than the compressed oops pointer range.
       
  1882 This option works only for 64\-bit JVMs.
       
  1883 .PP
       
  1884 It\[aq]s possible to use compressed pointers with Java heap sizes
       
  1885 greater than 32 GB.
       
  1886 See the \f[CB]\-XX:ObjectAlignmentInBytes\f[R] option.
       
  1887 .RE
       
  1888 .TP
       
  1889 .B \f[CB]\-XX:\-UseContainerSupport\f[R]
       
  1890 The VM now provides automatic container detection support, which allows
       
  1891 the VM to determine the amount of memory and number of processors that
       
  1892 are available to a Java process running in docker containers.
       
  1893 It uses this information to allocate system resources.
       
  1894 This support is only available on Linux x64 platforms.
       
  1895 \ If supported, the default for this flag is\ \f[CB]true\f[R], and
       
  1896 container support is enabled by default.
       
  1897 \ It\ can be disabled with\ \f[CB]\-XX:\-UseContainerSupport\f[R].
       
  1898 .RS
       
  1899 .PP
       
  1900 Unified Logging is available to help to diagnose issues related to this
       
  1901 support.
       
  1902 .PP
       
  1903 Use \f[CB]\-Xlog:os+container=trace\f[R] for maximum logging of container
       
  1904 information.
       
  1905 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R] for a
       
  1906 description of using Unified Logging.
       
  1907 .RE
       
  1908 .TP
       
  1909 .B \f[CB]\-XX:+UseHugeTLBFS\f[R]
       
  1910 \f[B]Linux only:\f[R] This option is the equivalent of specifying
       
  1911 \f[CB]\-XX:+UseLargePages\f[R].
       
  1912 This option is disabled by default.
       
  1913 This option pre\-allocates all large pages up\-front, when memory is
       
  1914 reserved; consequently the JVM can\[aq]t dynamically grow or shrink
       
  1915 large pages memory areas; see \f[CB]\-XX:UseTransparentHugePages\f[R] if
       
  1916 you want this behavior.
       
  1917 .RS
       
  1918 .PP
       
  1919 See \f[B]Large Pages\f[R].
       
  1920 .RE
       
  1921 .TP
       
  1922 .B \f[CB]\-XX:+UseLargePages\f[R]
       
  1923 Enables the use of large page memory.
       
  1924 By default, this option is disabled and large page memory isn\[aq]t
       
  1925 used.
       
  1926 .RS
       
  1927 .PP
       
  1928 See \f[B]Large Pages\f[R].
       
  1929 .RE
       
  1930 .TP
       
  1931 .B \f[CB]\-XX:+UseTransparentHugePages\f[R]
       
  1932 \f[B]Linux only:\f[R] Enables the use of large pages that can dynamically
       
  1933 grow or shrink.
       
  1934 This option is disabled by default.
       
  1935 You may encounter performance problems with transparent huge pages as
       
  1936 the OS moves other pages around to create huge pages; this option is
       
  1937 made available for experimentation.
       
  1938 .RS
       
  1939 .RE
       
  1940 .TP
       
  1941 .B \f[CB]\-XX:+AllowUserSignalHandlers\f[R]
       
  1942 Enables installation of signal handlers by the application.
       
  1943 By default, this option is disabled and the application isn\[aq]t
       
  1944 allowed to install signal handlers.
       
  1945 .RS
       
  1946 .RE
       
  1947 .TP
       
  1948 .B \f[CB]\-XX:VMOptionsFile=\f[R]\f[I]filename\f[R]
       
  1949 Allows user to specify VM options in a file, for example,
       
  1950 \f[CB]java\ \-XX:VMOptionsFile=/var/my_vm_options\ HelloWorld\f[R].
       
  1951 .RS
       
  1952 .RE
       
  1953 .SH ADVANCED JIT COMPILER OPTIONS FOR JAVA
       
  1954 .PP
       
  1955 These \f[CB]java\f[R] options control the dynamic just\-in\-time (JIT)
       
  1956 compilation performed by the Java HotSpot VM.
       
  1957 .TP
       
  1958 .B \f[CB]\-XX:AllocateInstancePrefetchLines=\f[R]\f[I]lines\f[R]
       
  1959 Sets the number of lines to prefetch ahead of the instance allocation
       
  1960 pointer.
       
  1961 By default, the number of lines to prefetch is set to 1:
       
  1962 .RS
       
  1963 .RS
       
  1964 .PP
       
  1965 \f[CB]\-XX:AllocateInstancePrefetchLines=1\f[R]
       
  1966 .RE
       
  1967 .PP
       
  1968 Only the Java HotSpot Server VM supports this option.
       
  1969 .RE
       
  1970 .TP
       
  1971 .B \f[CB]\-XX:AllocatePrefetchDistance=\f[R]\f[I]size\f[R]
       
  1972 Sets the size (in bytes) of the prefetch distance for object allocation.
       
  1973 Memory about to be written with the value of new objects is prefetched
       
  1974 up to this distance starting from the address of the last allocated
       
  1975 object.
       
  1976 Each Java thread has its own allocation point.
       
  1977 .RS
       
  1978 .PP
       
  1979 Negative values denote that prefetch distance is chosen based on the
       
  1980 platform.
       
  1981 Positive values are bytes to prefetch.
       
  1982 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  1983 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  1984 \f[CB]G\f[R] to indicate gigabytes.
       
  1985 The default value is set to \-1.
       
  1986 .PP
       
  1987 The following example shows how to set the prefetch distance to 1024
       
  1988 bytes:
       
  1989 .RS
       
  1990 .PP
       
  1991 \f[CB]\-XX:AllocatePrefetchDistance=1024\f[R]
       
  1992 .RE
       
  1993 .PP
       
  1994 Only the Java HotSpot Server VM supports this option.
       
  1995 .RE
       
  1996 .TP
       
  1997 .B \f[CB]\-XX:AllocatePrefetchInstr=\f[R]\f[I]instruction\f[R]
       
  1998 Sets the prefetch instruction to prefetch ahead of the allocation
       
  1999 pointer.
       
  2000 Only the Java HotSpot Server VM supports this option.
       
  2001 Possible values are from 0 to 3.
       
  2002 The actual instructions behind the values depend on the platform.
       
  2003 By default, the prefetch instruction is set to 0:
       
  2004 .RS
       
  2005 .RS
       
  2006 .PP
       
  2007 \f[CB]\-XX:AllocatePrefetchInstr=0\f[R]
       
  2008 .RE
       
  2009 .PP
       
  2010 Only the Java HotSpot Server VM supports this option.
       
  2011 .RE
       
  2012 .TP
       
  2013 .B \f[CB]\-XX:AllocatePrefetchLines=\f[R]\f[I]lines\f[R]
       
  2014 Sets the number of cache lines to load after the last object allocation
       
  2015 by using the prefetch instructions generated in compiled code.
       
  2016 The default value is 1 if the last allocated object was an instance, and
       
  2017 3 if it was an array.
       
  2018 .RS
       
  2019 .PP
       
  2020 The following example shows how to set the number of loaded cache lines
       
  2021 to 5:
       
  2022 .RS
       
  2023 .PP
       
  2024 \f[CB]\-XX:AllocatePrefetchLines=5\f[R]
       
  2025 .RE
       
  2026 .PP
       
  2027 Only the Java HotSpot Server VM supports this option.
       
  2028 .RE
       
  2029 .TP
       
  2030 .B \f[CB]\-XX:AllocatePrefetchStepSize=\f[R]\f[I]size\f[R]
       
  2031 Sets the step size (in bytes) for sequential prefetch instructions.
       
  2032 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2033 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, \f[CB]g\f[R] or \f[CB]G\f[R]
       
  2034 to indicate gigabytes.
       
  2035 By default, the step size is set to 16 bytes:
       
  2036 .RS
       
  2037 .RS
       
  2038 .PP
       
  2039 \f[CB]\-XX:AllocatePrefetchStepSize=16\f[R]
       
  2040 .RE
       
  2041 .PP
       
  2042 Only the Java HotSpot Server VM supports this option.
       
  2043 .RE
       
  2044 .TP
       
  2045 .B \f[CB]\-XX:AllocatePrefetchStyle=\f[R]\f[I]style\f[R]
       
  2046 Sets the generated code style for prefetch instructions.
       
  2047 The \f[I]style\f[R] argument is an integer from 0 to 3:
       
  2048 .RS
       
  2049 .TP
       
  2050 .B \f[CB]0\f[R]
       
  2051 Don\[aq]t generate prefetch instructions.
       
  2052 .RS
       
  2053 .RE
       
  2054 .TP
       
  2055 .B \f[CB]1\f[R]
       
  2056 Execute prefetch instructions after each allocation.
       
  2057 This is the default parameter.
       
  2058 .RS
       
  2059 .RE
       
  2060 .TP
       
  2061 .B \f[CB]2\f[R]
       
  2062 Use the thread\-local allocation block (TLAB) watermark pointer to
       
  2063 determine when prefetch instructions are executed.
       
  2064 .RS
       
  2065 .RE
       
  2066 .TP
       
  2067 .B \f[CB]3\f[R]
       
  2068 Use BIS instruction on SPARC for allocation prefetch.
       
  2069 .RS
       
  2070 .RE
       
  2071 .PP
       
  2072 Only the Java HotSpot Server VM supports this option.
       
  2073 .RE
       
  2074 .TP
       
  2075 .B \f[CB]\-XX:+BackgroundCompilation\f[R]
       
  2076 Enables background compilation.
       
  2077 This option is enabled by default.
       
  2078 To disable background compilation, specify
       
  2079 \f[CB]\-XX:\-BackgroundCompilation\f[R] (this is equivalent to specifying
       
  2080 \f[CB]\-Xbatch\f[R]).
       
  2081 .RS
       
  2082 .RE
       
  2083 .TP
       
  2084 .B \f[CB]\-XX:CICompilerCount=\f[R]\f[I]threads\f[R]
       
  2085 Sets the number of compiler threads to use for compilation.
       
  2086 By default, the number of threads is set to 2 for the server JVM, to 1
       
  2087 for the client JVM, and it scales to the number of cores if tiered
       
  2088 compilation is used.
       
  2089 The following example shows how to set the number of threads to 2:
       
  2090 .RS
       
  2091 .RS
       
  2092 .PP
       
  2093 \f[CB]\-XX:CICompilerCount=2\f[R]
       
  2094 .RE
       
  2095 .RE
       
  2096 .TP
       
  2097 .B \f[CB]\-XX:CompileCommand=\f[R]\f[I]command\f[R]\f[CB],\f[R]\f[I]method\f[R][\f[CB],\f[R]\f[I]option\f[R]]
       
  2098 Specifies a \f[I]command\f[R] to perform on a \f[I]method\f[R].
       
  2099 For example, to exclude the \f[CB]indexOf()\f[R] method of the
       
  2100 \f[CB]String\f[R] class from being compiled, use the following:
       
  2101 .RS
       
  2102 .RS
       
  2103 .PP
       
  2104 \f[CB]\-XX:CompileCommand=exclude,java/lang/String.indexOf\f[R]
       
  2105 .RE
       
  2106 .PP
       
  2107 Note that the full class name is specified, including all packages and
       
  2108 subpackages separated by a slash (\f[CB]/\f[R]).
       
  2109 For easier cut\-and\-paste operations, it\[aq]s also possible to use the
       
  2110 method name format produced by the \f[CB]\-XX:+PrintCompilation\f[R] and
       
  2111 \f[CB]\-XX:+LogCompilation\f[R] options:
       
  2112 .RS
       
  2113 .PP
       
  2114 \f[CB]\-XX:CompileCommand=exclude,java.lang.String::indexOf\f[R]
       
  2115 .RE
       
  2116 .PP
       
  2117 If the method is specified without the signature, then the command is
       
  2118 applied to all methods with the specified name.
       
  2119 However, you can also specify the signature of the method in the class
       
  2120 file format.
       
  2121 In this case, you should enclose the arguments in quotation marks,
       
  2122 because otherwise the shell treats the semicolon as a command end.
       
  2123 For example, if you want to exclude only the \f[CB]indexOf(String)\f[R]
       
  2124 method of the \f[CB]String\f[R] class from being compiled, use the
       
  2125 following:
       
  2126 .RS
       
  2127 .PP
       
  2128 \f[CB]\-XX:CompileCommand="exclude,java/lang/String.indexOf,(Ljava/lang/String;)I"\f[R]
       
  2129 .RE
       
  2130 .PP
       
  2131 You can also use the asterisk (*) as a wildcard for class and method
       
  2132 names.
       
  2133 For example, to exclude all \f[CB]indexOf()\f[R] methods in all classes
       
  2134 from being compiled, use the following:
       
  2135 .RS
       
  2136 .PP
       
  2137 \f[CB]\-XX:CompileCommand=exclude,*.indexOf\f[R]
       
  2138 .RE
       
  2139 .PP
       
  2140 The commas and periods are aliases for spaces, making it easier to pass
       
  2141 compiler commands through a shell.
       
  2142 You can pass arguments to \f[CB]\-XX:CompileCommand\f[R] using spaces as
       
  2143 separators by enclosing the argument in quotation marks:
       
  2144 .RS
       
  2145 .PP
       
  2146 \f[CB]\-XX:CompileCommand="exclude\ java/lang/String\ indexOf"\f[R]
       
  2147 .RE
       
  2148 .PP
       
  2149 Note that after parsing the commands passed on the command line using
       
  2150 the \f[CB]\-XX:CompileCommand\f[R] options, the JIT compiler then reads
       
  2151 commands from the \f[CB]\&.hotspot_compiler\f[R] file.
       
  2152 You can add commands to this file or specify a different file using the
       
  2153 \f[CB]\-XX:CompileCommandFile\f[R] option.
       
  2154 .PP
       
  2155 To add several commands, either specify the \f[CB]\-XX:CompileCommand\f[R]
       
  2156 option multiple times, or separate each argument with the new line
       
  2157 separator (\f[CB]\\n\f[R]).
       
  2158 The following commands are available:
       
  2159 .TP
       
  2160 .B \f[CB]break\f[R]
       
  2161 Sets a breakpoint when debugging the JVM to stop at the beginning of
       
  2162 compilation of the specified method.
       
  2163 .RS
       
  2164 .RE
       
  2165 .TP
       
  2166 .B \f[CB]compileonly\f[R]
       
  2167 Excludes all methods from compilation except for the specified method.
       
  2168 As an alternative, you can use the \f[CB]\-XX:CompileOnly\f[R] option,
       
  2169 which lets you specify several methods.
       
  2170 .RS
       
  2171 .RE
       
  2172 .TP
       
  2173 .B \f[CB]dontinline\f[R]
       
  2174 Prevents inlining of the specified method.
       
  2175 .RS
       
  2176 .RE
       
  2177 .TP
       
  2178 .B \f[CB]exclude\f[R]
       
  2179 Excludes the specified method from compilation.
       
  2180 .RS
       
  2181 .RE
       
  2182 .TP
       
  2183 .B \f[CB]help\f[R]
       
  2184 Prints a help message for the \f[CB]\-XX:CompileCommand\f[R] option.
       
  2185 .RS
       
  2186 .RE
       
  2187 .TP
       
  2188 .B \f[CB]inline\f[R]
       
  2189 Attempts to inline the specified method.
       
  2190 .RS
       
  2191 .RE
       
  2192 .TP
       
  2193 .B \f[CB]log\f[R]
       
  2194 Excludes compilation logging (with the \f[CB]\-XX:+LogCompilation\f[R]
       
  2195 option) for all methods except for the specified method.
       
  2196 By default, logging is performed for all compiled methods.
       
  2197 .RS
       
  2198 .RE
       
  2199 .TP
       
  2200 .B \f[CB]option\f[R]
       
  2201 Passes a JIT compilation option to the specified method in place of the
       
  2202 last argument (\f[CB]option\f[R]).
       
  2203 The compilation option is set at the end, after the method name.
       
  2204 For example, to enable the \f[CB]BlockLayoutByFrequency\f[R] option for
       
  2205 the \f[CB]append()\f[R] method of the \f[CB]StringBuffer\f[R] class, use the
       
  2206 following:
       
  2207 .RS
       
  2208 .RS
       
  2209 .PP
       
  2210 \f[CB]\-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency\f[R]
       
  2211 .RE
       
  2212 .PP
       
  2213 You can specify multiple compilation options, separated by commas or
       
  2214 spaces.
       
  2215 .RE
       
  2216 .TP
       
  2217 .B \f[CB]print\f[R]
       
  2218 Prints generated assembler code after compilation of the specified
       
  2219 method.
       
  2220 .RS
       
  2221 .RE
       
  2222 .TP
       
  2223 .B \f[CB]quiet\f[R]
       
  2224 Instructs not to print the compile commands.
       
  2225 By default, the commands that you specify with the
       
  2226 \f[CB]\-XX:CompileCommand\f[R] option are printed; for example, if you
       
  2227 exclude from compilation the \f[CB]indexOf()\f[R] method of the
       
  2228 \f[CB]String\f[R] class, then the following is printed to standard output:
       
  2229 .RS
       
  2230 .RS
       
  2231 .PP
       
  2232 \f[CB]CompilerOracle:\ exclude\ java/lang/String.indexOf\f[R]
       
  2233 .RE
       
  2234 .PP
       
  2235 You can suppress this by specifying the
       
  2236 \f[CB]\-XX:CompileCommand=quiet\f[R] option before other
       
  2237 \f[CB]\-XX:CompileCommand\f[R] options.
       
  2238 .RE
       
  2239 .RE
       
  2240 .TP
       
  2241 .B \f[CB]\-XX:CompileCommandFile=\f[R]\f[I]filename\f[R]
       
  2242 Sets the file from which JIT compiler commands are read.
       
  2243 By default, the \f[CB]\&.hotspot_compiler\f[R] file is used to store
       
  2244 commands performed by the JIT compiler.
       
  2245 .RS
       
  2246 .PP
       
  2247 Each line in the command file represents a command, a class name, and a
       
  2248 method name for which the command is used.
       
  2249 For example, this line prints assembly code for the \f[CB]toString()\f[R]
       
  2250 method of the \f[CB]String\f[R] class:
       
  2251 .RS
       
  2252 .PP
       
  2253 \f[CB]print\ java/lang/String\ toString\f[R]
       
  2254 .RE
       
  2255 .PP
       
  2256 If you\[aq]re using commands for the JIT compiler to perform on methods,
       
  2257 then see the \f[CB]\-XX:CompileCommand\f[R] option.
       
  2258 .RE
       
  2259 .TP
       
  2260 .B \f[CB]\-XX:CompilerDirectivesFile=\f[R]\f[I]file\f[R]
       
  2261 Adds directives from a file to the directives stack when a program
       
  2262 starts.
       
  2263 See \f[B]Compiler Control\f[R]
       
  2264 [https://docs.oracle.com/en/java/javase/12/vm/compiler\-control1.html#GUID\-94AD8194\-786A\-4F19\-BFFF\-278F8E237F3A].
       
  2265 .RS
       
  2266 .PP
       
  2267 The \f[CB]\-XX:CompilerDirectivesFile\f[R] option has to be used together
       
  2268 with the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks
       
  2269 diagnostic JVM options.
       
  2270 .RE
       
  2271 .TP
       
  2272 .B \f[CB]\-XX:+CompilerDirectivesPrint\f[R]
       
  2273 Prints the directives stack when the program starts or when a new
       
  2274 directive is added.
       
  2275 .RS
       
  2276 .PP
       
  2277 The \f[CB]\-XX:+CompilerDirectivesPrint\f[R] option has to be used
       
  2278 together with the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that
       
  2279 unlocks diagnostic JVM options.
       
  2280 .RE
       
  2281 .TP
       
  2282 .B \f[CB]\-XX:CompileOnly=\f[R]\f[I]methods\f[R]
       
  2283 Sets the list of methods (separated by commas) to which compilation
       
  2284 should be restricted.
       
  2285 Only the specified methods are compiled.
       
  2286 Specify each method with the full class name (including the packages and
       
  2287 subpackages).
       
  2288 For example, to compile only the \f[CB]length()\f[R] method of the
       
  2289 \f[CB]String\f[R] class and the \f[CB]size()\f[R] method of the
       
  2290 \f[CB]List\f[R] class, use the following:
       
  2291 .RS
       
  2292 .RS
       
  2293 .PP
       
  2294 \f[CB]\-XX:CompileOnly=java/lang/String.length,java/util/List.size\f[R]
       
  2295 .RE
       
  2296 .PP
       
  2297 Note that the full class name is specified, including all packages and
       
  2298 subpackages separated by a slash (\f[CB]/\f[R]).
       
  2299 For easier cut and paste operations, it\[aq]s also possible to use the
       
  2300 method name format produced by the \f[CB]\-XX:+PrintCompilation\f[R] and
       
  2301 \f[CB]\-XX:+LogCompilation\f[R] options:
       
  2302 .RS
       
  2303 .PP
       
  2304 \f[CB]\-XX:CompileOnly=java.lang.String::length,java.util.List::size\f[R]
       
  2305 .RE
       
  2306 .PP
       
  2307 Although wildcards aren\[aq]t supported, you can specify only the class
       
  2308 or package name to compile all methods in that class or package, as well
       
  2309 as specify just the method to compile methods with this name in any
       
  2310 class:
       
  2311 .IP
       
  2312 .nf
       
  2313 \f[CB]
       
  2314 \-XX:CompileOnly=java/lang/String
       
  2315 \-XX:CompileOnly=java/lang
       
  2316 \-XX:CompileOnly=.length
       
  2317 \f[R]
       
  2318 .fi
       
  2319 .RE
       
  2320 .TP
       
  2321 .B \f[CB]\-XX:CompileThreshold=\f[R]\f[I]invocations\f[R]
       
  2322 Sets the number of interpreted method invocations before compilation.
       
  2323 By default, in the server JVM, the JIT compiler performs 10,000
       
  2324 interpreted method invocations to gather information for efficient
       
  2325 compilation.
       
  2326 For the client JVM, the default setting is 1,500 invocations.
       
  2327 This option is ignored when tiered compilation is enabled; see the
       
  2328 option \f[CB]\-XX:\-TieredCompilation\f[R].
       
  2329 The following example shows how to set the number of interpreted method
       
  2330 invocations to 5,000:
       
  2331 .RS
       
  2332 .RS
       
  2333 .PP
       
  2334 \f[CB]\-XX:CompileThreshold=5000\f[R]
       
  2335 .RE
       
  2336 .PP
       
  2337 You can completely disable interpretation of Java methods before
       
  2338 compilation by specifying the \f[CB]\-Xcomp\f[R] option.
       
  2339 .RE
       
  2340 .TP
       
  2341 .B \f[CB]\-XX:CompileThresholdScaling=\f[R]\f[I]scale\f[R]
       
  2342 Provides unified control of first compilation.
       
  2343 This option controls when methods are first compiled for both the tiered
       
  2344 and the nontiered modes of operation.
       
  2345 The \f[CB]CompileThresholdScaling\f[R] option has an integer value between
       
  2346 0 and +Inf and scales the thresholds corresponding to the current mode
       
  2347 of operation (both tiered and nontiered).
       
  2348 Setting \f[CB]CompileThresholdScaling\f[R] to a value less than 1.0
       
  2349 results in earlier compilation while values greater than 1.0 delay
       
  2350 compilation.
       
  2351 Setting \f[CB]CompileThresholdScaling\f[R] to 0 is equivalent to disabling
       
  2352 compilation.
       
  2353 .RS
       
  2354 .RE
       
  2355 .TP
       
  2356 .B \f[CB]\-XX:+DoEscapeAnalysis\f[R]
       
  2357 Enables the use of escape analysis.
       
  2358 This option is enabled by default.
       
  2359 To disable the use of escape analysis, specify
       
  2360 \f[CB]\-XX:\-DoEscapeAnalysis\f[R].
       
  2361 Only the Java HotSpot Server VM supports this option.
       
  2362 .RS
       
  2363 .RE
       
  2364 .TP
       
  2365 .B \f[CB]\-XX:InitialCodeCacheSize=\f[R]\f[I]size\f[R]
       
  2366 Sets the initial code cache size (in bytes).
       
  2367 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2368 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  2369 \f[CB]G\f[R] to indicate gigabytes.
       
  2370 The default value is set to 500 KB.
       
  2371 The initial code cache size shouldn\[aq]t be less than the system\[aq]s
       
  2372 minimal memory page size.
       
  2373 The following example shows how to set the initial code cache size to 32
       
  2374 KB:
       
  2375 .RS
       
  2376 .RS
       
  2377 .PP
       
  2378 \f[CB]\-XX:InitialCodeCacheSize=32k\f[R]
       
  2379 .RE
       
  2380 .RE
       
  2381 .TP
       
  2382 .B \f[CB]\-XX:+Inline\f[R]
       
  2383 Enables method inlining.
       
  2384 This option is enabled by default to increase performance.
       
  2385 To disable method inlining, specify \f[CB]\-XX:\-Inline\f[R].
       
  2386 .RS
       
  2387 .RE
       
  2388 .TP
       
  2389 .B \f[CB]\-XX:InlineSmallCode=\f[R]\f[I]size\f[R]
       
  2390 Sets the maximum code size (in bytes) for compiled methods that should
       
  2391 be inlined.
       
  2392 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2393 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  2394 \f[CB]G\f[R] to indicate gigabytes.
       
  2395 Only compiled methods with the size smaller than the specified size is
       
  2396 inlined.
       
  2397 By default, the maximum code size is set to 1000 bytes:
       
  2398 .RS
       
  2399 .RS
       
  2400 .PP
       
  2401 \f[CB]\-XX:InlineSmallCode=1000\f[R]
       
  2402 .RE
       
  2403 .RE
       
  2404 .TP
       
  2405 .B \f[CB]\-XX:+LogCompilation\f[R]
       
  2406 Enables logging of compilation activity to a file named
       
  2407 \f[CB]hotspot.log\f[R] in the current working directory.
       
  2408 You can specify a different log file path and name using the
       
  2409 \f[CB]\-XX:LogFile\f[R] option.
       
  2410 .RS
       
  2411 .PP
       
  2412 By default, this option is disabled and compilation activity isn\[aq]t
       
  2413 logged.
       
  2414 The \f[CB]\-XX:+LogCompilation\f[R] option has to be used together with
       
  2415 the \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks
       
  2416 diagnostic JVM options.
       
  2417 .PP
       
  2418 You can enable verbose diagnostic output with a message printed to the
       
  2419 console every time a method is compiled by using the
       
  2420 \f[CB]\-XX:+PrintCompilation\f[R] option.
       
  2421 .RE
       
  2422 .TP
       
  2423 .B \f[CB]\-XX:MaxInlineSize=\f[R]\f[I]size\f[R]
       
  2424 Sets the maximum bytecode size (in bytes) of a method to be inlined.
       
  2425 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2426 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  2427 \f[CB]G\f[R] to indicate gigabytes.
       
  2428 By default, the maximum bytecode size is set to 35 bytes:
       
  2429 .RS
       
  2430 .RS
       
  2431 .PP
       
  2432 \f[CB]\-XX:MaxInlineSize=35\f[R]
       
  2433 .RE
       
  2434 .RE
       
  2435 .TP
       
  2436 .B \f[CB]\-XX:MaxNodeLimit=\f[R]\f[I]nodes\f[R]
       
  2437 Sets the maximum number of nodes to be used during single method
       
  2438 compilation.
       
  2439 By default, the maximum number of nodes is set to 65,000:
       
  2440 .RS
       
  2441 .RS
       
  2442 .PP
       
  2443 \f[CB]\-XX:MaxNodeLimit=65000\f[R]
       
  2444 .RE
       
  2445 .RE
       
  2446 .TP
       
  2447 .B \f[CB]\-XX:NonNMethodCodeHeapSize=\f[R]\f[I]size\f[R]
       
  2448 Sets the size in bytes of the code segment containing nonmethod code.
       
  2449 .RS
       
  2450 .PP
       
  2451 A nonmethod code segment containing nonmethod code, such as compiler
       
  2452 buffers and the bytecode interpreter.
       
  2453 This code type stays in the code cache forever.
       
  2454 This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled.
       
  2455 .RE
       
  2456 .TP
       
  2457 .B \f[CB]\-XX:NonProfiledCodeHeapSize=\f[R]\f[I]size\f[R]
       
  2458 Sets the size in bytes of the code segment containing nonprofiled
       
  2459 methods.
       
  2460 This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled.
       
  2461 .RS
       
  2462 .RE
       
  2463 .TP
       
  2464 .B \f[CB]\-XX:MaxTrivialSize=\f[R]\f[I]size\f[R]
       
  2465 Sets the maximum bytecode size (in bytes) of a trivial method to be
       
  2466 inlined.
       
  2467 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2468 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  2469 \f[CB]G\f[R] to indicate gigabytes.
       
  2470 By default, the maximum bytecode size of a trivial method is set to 6
       
  2471 bytes:
       
  2472 .RS
       
  2473 .RS
       
  2474 .PP
       
  2475 \f[CB]\-XX:MaxTrivialSize=6\f[R]
       
  2476 .RE
       
  2477 .RE
       
  2478 .TP
       
  2479 .B \f[CB]\-XX:+OptimizeStringConcat\f[R]
       
  2480 Enables the optimization of \f[CB]String\f[R] concatenation operations.
       
  2481 This option is enabled by default.
       
  2482 To disable the optimization of \f[CB]String\f[R] concatenation operations,
       
  2483 specify \f[CB]\-XX:\-OptimizeStringConcat\f[R].
       
  2484 Only the Java HotSpot Server VM supports this option.
       
  2485 .RS
       
  2486 .RE
       
  2487 .TP
       
  2488 .B \f[CB]\-XX:+PrintAssembly\f[R]
       
  2489 Enables printing of assembly code for bytecoded and native methods by
       
  2490 using the external \f[CB]hsdis\-<arch>.so\f[R] or \f[CB]\&.dll\f[R] library.
       
  2491 For 64\-bit VM on Windows, it\[aq]s \f[CB]hsdis\-amd64.dll\f[R].
       
  2492 This lets you to see the generated code, which may help you to diagnose
       
  2493 performance issues.
       
  2494 .RS
       
  2495 .PP
       
  2496 By default, this option is disabled and assembly code isn\[aq]t printed.
       
  2497 The \f[CB]\-XX:+PrintAssembly\f[R] option has to be used together with the
       
  2498 \f[CB]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic
       
  2499 JVM options.
       
  2500 .RE
       
  2501 .TP
       
  2502 .B \f[CB]\-XX:ProfiledCodeHeapSize=\f[R]\f[I]size\f[R]
       
  2503 Sets the size in bytes of the code segment containing profiled methods.
       
  2504 This flag is used only if \f[CB]\-XX:SegmentedCodeCache\f[R] is enabled.
       
  2505 .RS
       
  2506 .RE
       
  2507 .TP
       
  2508 .B \f[CB]\-XX:+PrintCompilation\f[R]
       
  2509 Enables verbose diagnostic output from the JVM by printing a message to
       
  2510 the console every time a method is compiled.
       
  2511 This lets you to see which methods actually get compiled.
       
  2512 By default, this option is disabled and diagnostic output isn\[aq]t
       
  2513 printed.
       
  2514 .RS
       
  2515 .PP
       
  2516 You can also log compilation activity to a file by using the
       
  2517 \f[CB]\-XX:+LogCompilation\f[R] option.
       
  2518 .RE
       
  2519 .TP
       
  2520 .B \f[CB]\-XX:+PrintInlining\f[R]
       
  2521 Enables printing of inlining decisions.
       
  2522 This let\[aq]s you see which methods are getting inlined.
       
  2523 .RS
       
  2524 .PP
       
  2525 By default, this option is disabled and inlining information isn\[aq]t
       
  2526 printed.
       
  2527 The \f[CB]\-XX:+PrintInlining\f[R] option has to be used together with the
       
  2528 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R] option that unlocks diagnostic
       
  2529 JVM options.
       
  2530 .RE
       
  2531 .TP
       
  2532 .B \f[CB]\-XX:ReservedCodeCacheSize=\f[R]\f[I]size\f[R]
       
  2533 Sets the maximum code cache size (in bytes) for JIT\-compiled code.
       
  2534 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  2535 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  2536 \f[CB]G\f[R] to indicate gigabytes.
       
  2537 The default maximum code cache size is 240 MB; if you disable tiered
       
  2538 compilation with the option \f[CB]\-XX:\-TieredCompilation\f[R], then the
       
  2539 default size is 48 MB.
       
  2540 This option has a limit of 2 GB; otherwise, an error is generated.
       
  2541 The maximum code cache size shouldn\[aq]t be less than the initial code
       
  2542 cache size; see the option \f[CB]\-XX:InitialCodeCacheSize\f[R].
       
  2543 .RS
       
  2544 .RE
       
  2545 .TP
       
  2546 .B \f[CB]\-XX:RTMAbortRatio=\f[R]\f[I]abort_ratio\f[R]
       
  2547 Specifies the RTM abort ratio is specified as a percentage (%) of all
       
  2548 executed RTM transactions.
       
  2549 If a number of aborted transactions becomes greater than this ratio,
       
  2550 then the compiled code is deoptimized.
       
  2551 This ratio is used when the \f[CB]\-XX:+UseRTMDeopt\f[R] option is
       
  2552 enabled.
       
  2553 The default value of this option is 50.
       
  2554 This means that the compiled code is deoptimized if 50% of all
       
  2555 transactions are aborted.
       
  2556 .RS
       
  2557 .RE
       
  2558 .TP
       
  2559 .B \f[CB]\-XX:RTMRetryCount=\f[R]\f[I]number_of_retries\f[R]
       
  2560 Specifies the number of times that the RTM locking code is retried, when
       
  2561 it is aborted or busy, before falling back to the normal locking
       
  2562 mechanism.
       
  2563 The default value for this option is 5.
       
  2564 The \f[CB]\-XX:UseRTMLocking\f[R] option must be enabled.
       
  2565 .RS
       
  2566 .RE
       
  2567 .TP
       
  2568 .B \f[CB]\-XX:+SegmentedCodeCache\f[R]
       
  2569 Enables segmentation of the code cache.
       
  2570 Without the \f[CB]\-XX:+SegmentedCodeCache\f[R], the code cache consists
       
  2571 of one large segment.
       
  2572 With \f[CB]\-XX:+SegmentedCodeCache\f[R], we have separate segments for
       
  2573 nonmethod, profiled method, and nonprofiled method code.
       
  2574 These segments aren\[aq]t resized at runtime.
       
  2575 The feature is enabled by default if tiered compilation is enabled
       
  2576 (\f[CB]\-XX:+TieredCompilation\f[R] ) and
       
  2577 \f[CB]\-XX:ReservedCodeCacheSize\f[R] >= 240 MB.
       
  2578 The advantages are better control of the memory footprint, reduced code
       
  2579 fragmentation, and better iTLB/iCache behavior due to improved locality.
       
  2580 iTLB/iCache is a CPU\-specific term meaning Instruction Translation
       
  2581 Lookaside Buffer (ITLB).
       
  2582 ICache is an instruction cache in theCPU.
       
  2583 The implementation of the code cache can be found in the file:
       
  2584 \f[CB]/share/vm/code/codeCache.cpp\f[R].
       
  2585 .RS
       
  2586 .RE
       
  2587 .TP
       
  2588 .B \f[CB]\-XX:StartAggressiveSweepingAt=\f[R]\f[I]percent\f[R]
       
  2589 Forces stack scanning of active methods to aggressively remove unused
       
  2590 code when only the given percentage of the code cache is free.
       
  2591 The default value is 10%.
       
  2592 .RS
       
  2593 .RE
       
  2594 .TP
       
  2595 .B \f[CB]\-XX:\-TieredCompilation\f[R]
       
  2596 Disables the use of tiered compilation.
       
  2597 By default, this option is enabled.
       
  2598 Only the Java HotSpot Server VM supports this option.
       
  2599 .RS
       
  2600 .RE
       
  2601 .TP
       
  2602 .B \f[CB]\-XX:+UseAES\f[R]
       
  2603 Enables hardware\-based AES intrinsics for Intel, AMD, and SPARC
       
  2604 hardware.
       
  2605 Intel Westmere (2010 and newer), AMD Bulldozer (2011 and newer), and
       
  2606 SPARC (T4 and newer) are the supported hardware.
       
  2607 The \f[CB]\-XX:+UseAES\f[R] is used in conjunction with UseAESIntrinsics.
       
  2608 Flags that control intrinsics now require the option
       
  2609 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2610 .RS
       
  2611 .RE
       
  2612 .TP
       
  2613 .B \f[CB]\-XX:+UseAESIntrinsics\f[R]
       
  2614 Enables \f[CB]\-XX:+UseAES\f[R] and \f[CB]\-XX:+UseAESIntrinsics\f[R] flags
       
  2615 by default and are supported only for the Java HotSpot Server VM.
       
  2616 To disable hardware\-based AES intrinsics, specify
       
  2617 \f[CB]\-XX:\-UseAES\ \-XX:\-UseAESIntrinsics\f[R].
       
  2618 For example, to enable hardware AES, use the following flags:
       
  2619 .RS
       
  2620 .RS
       
  2621 .PP
       
  2622 \f[CB]\-XX:+UseAES\ \-XX:+UseAESIntrinsics\f[R]
       
  2623 .RE
       
  2624 .PP
       
  2625 Flags that control intrinsics now require the option
       
  2626 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2627 To support UseAES and UseAESIntrinsics flags, use the \f[CB]\-server\f[R]
       
  2628 option to select the Java HotSpot Server VM.
       
  2629 These flags aren\[aq]t supported on Client VM.
       
  2630 .RE
       
  2631 .TP
       
  2632 .B \f[CB]\-XX:+UseCMoveUnconditionally\f[R]
       
  2633 Generates CMove (scalar and vector) instructions regardless of
       
  2634 profitability analysis.
       
  2635 .RS
       
  2636 .RE
       
  2637 .TP
       
  2638 .B \f[CB]\-XX:+UseCodeCacheFlushing\f[R]
       
  2639 Enables flushing of the code cache before shutting down the compiler.
       
  2640 This option is enabled by default.
       
  2641 To disable flushing of the code cache before shutting down the compiler,
       
  2642 specify \f[CB]\-XX:\-UseCodeCacheFlushing\f[R].
       
  2643 .RS
       
  2644 .RE
       
  2645 .TP
       
  2646 .B \f[CB]\-XX:+UseCondCardMark\f[R]
       
  2647 Enables checking if the card is already marked before updating the card
       
  2648 table.
       
  2649 This option is disabled by default.
       
  2650 It should be used only on machines with multiple sockets, where it
       
  2651 increases the performance of Java applications that rely on concurrent
       
  2652 operations.
       
  2653 Only the Java HotSpot Server VM supports this option.
       
  2654 .RS
       
  2655 .RE
       
  2656 .TP
       
  2657 .B \f[CB]\-XX:+UseCountedLoopSafepoints\f[R]
       
  2658 Keeps safepoints in counted loops.
       
  2659 Its default value is false.\ 
       
  2660 .RS
       
  2661 .RE
       
  2662 .TP
       
  2663 .B \f[CB]\-XX:+UseFMA\f[R]
       
  2664 Enables hardware\-based FMA intrinsics for hardware where FMA
       
  2665 instructions are available (such as, Intel, SPARC, and ARM64).
       
  2666 FMA intrinsics are generated for the
       
  2667 \f[CB]java.lang.Math.fma(\f[R]\f[I]a\f[R]\f[CB],\f[R] \f[I]b\f[R]\f[CB],\f[R]
       
  2668 \f[I]c\f[R]\f[CB])\f[R] methods that calculate the value of \f[CB](\f[R]
       
  2669 \f[I]a\f[R] \f[CB]*\f[R] \f[I]b\f[R] \f[CB]+\f[R] \f[I]c\f[R] \f[CB])\f[R]
       
  2670 expressions.
       
  2671 .RS
       
  2672 .RE
       
  2673 .TP
       
  2674 .B \f[CB]\-XX:+UseRTMDeopt\f[R]
       
  2675 Autotunes RTM locking depending on the abort ratio.
       
  2676 This ratio is specified by the \f[CB]\-XX:RTMAbortRatio\f[R] option.
       
  2677 If the number of aborted transactions exceeds the abort ratio, then the
       
  2678 method containing the lock is deoptimized and recompiled with all locks
       
  2679 as normal locks.
       
  2680 This option is disabled by default.
       
  2681 The \f[CB]\-XX:+UseRTMLocking\f[R] option must be enabled.
       
  2682 .RS
       
  2683 .RE
       
  2684 .TP
       
  2685 .B \f[CB]\-XX:+UseRTMLocking\f[R]
       
  2686 Generates Restricted Transactional Memory (RTM) locking code for all
       
  2687 inflated locks, with the normal locking mechanism as the fallback
       
  2688 handler.
       
  2689 This option is disabled by default.
       
  2690 Options related to RTM are available only for the Java HotSpot Server VM
       
  2691 on x86 CPUs that support Transactional Synchronization Extensions (TSX).
       
  2692 .RS
       
  2693 .PP
       
  2694 RTM is part of Intel\[aq]s TSX, which is an x86 instruction set
       
  2695 extension and facilitates the creation of multithreaded applications.
       
  2696 RTM introduces the new instructions \f[CB]XBEGIN\f[R], \f[CB]XABORT\f[R],
       
  2697 \f[CB]XEND\f[R], and \f[CB]XTEST\f[R].
       
  2698 The \f[CB]XBEGIN\f[R] and \f[CB]XEND\f[R] instructions enclose a set of
       
  2699 instructions to run as a transaction.
       
  2700 If no conflict is found when running the transaction, then the memory
       
  2701 and register modifications are committed together at the \f[CB]XEND\f[R]
       
  2702 instruction.
       
  2703 The \f[CB]XABORT\f[R] instruction can be used to explicitly abort a
       
  2704 transaction and the \f[CB]XEND\f[R] instruction checks if a set of
       
  2705 instructions is being run in a transaction.
       
  2706 .PP
       
  2707 A lock on a transaction is inflated when another thread tries to access
       
  2708 the same transaction, thereby blocking the thread that didn\[aq]t
       
  2709 originally request access to the transaction.
       
  2710 RTM requires that a fallback set of operations be specified in case a
       
  2711 transaction aborts or fails.
       
  2712 An RTM lock is a lock that has been delegated to the TSX\[aq]s system.
       
  2713 .PP
       
  2714 RTM improves performance for highly contended locks with low conflict in
       
  2715 a critical region (which is code that must not be accessed by more than
       
  2716 one thread concurrently).
       
  2717 RTM also improves the performance of coarse\-grain locking, which
       
  2718 typically doesn\[aq]t perform well in multithreaded applications.
       
  2719 (Coarse\-grain locking is the strategy of holding locks for long periods
       
  2720 to minimize the overhead of taking and releasing locks, while
       
  2721 fine\-grained locking is the strategy of trying to achieve maximum
       
  2722 parallelism by locking only when necessary and unlocking as soon as
       
  2723 possible.) Also, for lightly contended locks that are used by different
       
  2724 threads, RTM can reduce false cache line sharing, also known as cache
       
  2725 line ping\-pong.
       
  2726 This occurs when multiple threads from different processors are
       
  2727 accessing different resources, but the resources share the same cache
       
  2728 line.
       
  2729 As a result, the processors repeatedly invalidate the cache lines of
       
  2730 other processors, which forces them to read from main memory instead of
       
  2731 their cache.
       
  2732 .RE
       
  2733 .TP
       
  2734 .B \f[CB]\-XX:+UseSHA\f[R]
       
  2735 Enables hardware\-based intrinsics for SHA crypto hash functions for
       
  2736 SPARC hardware.
       
  2737 The \f[CB]UseSHA\f[R] option is used in conjunction with the
       
  2738 \f[CB]UseSHA1Intrinsics\f[R], \f[CB]UseSHA256Intrinsics\f[R], and
       
  2739 \f[CB]UseSHA512Intrinsics\f[R] options.
       
  2740 .RS
       
  2741 .PP
       
  2742 The \f[CB]UseSHA\f[R] and \f[CB]UseSHA*Intrinsics\f[R] flags are enabled by
       
  2743 default, and are supported only for Java HotSpot Server VM 64\-bit on
       
  2744 SPARC T4 and newer.
       
  2745 .PP
       
  2746 This feature is applicable only when using the
       
  2747 \f[CB]sun.security.provider.Sun\f[R] provider for SHA operations.
       
  2748 Flags that control intrinsics now require the option
       
  2749 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2750 .PP
       
  2751 To disable all hardware\-based SHA intrinsics, specify the
       
  2752 \f[CB]\-XX:\-UseSHA\f[R].
       
  2753 To disable only a particular SHA intrinsic, use the appropriate
       
  2754 corresponding option.
       
  2755 For example: \f[CB]\-XX:\-UseSHA256Intrinsics\f[R].
       
  2756 .RE
       
  2757 .TP
       
  2758 .B \f[CB]\-XX:+UseSHA1Intrinsics\f[R]
       
  2759 Enables intrinsics for SHA\-1 crypto hash function.
       
  2760 Flags that control intrinsics now require the option
       
  2761 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2762 .RS
       
  2763 .RE
       
  2764 .TP
       
  2765 .B \f[CB]\-XX:+UseSHA256Intrinsics\f[R]
       
  2766 Enables intrinsics for SHA\-224 and SHA\-256 crypto hash functions.
       
  2767 Flags that control intrinsics now require the option
       
  2768 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2769 .RS
       
  2770 .RE
       
  2771 .TP
       
  2772 .B \f[CB]\-XX:+UseSHA512Intrinsics\f[R]
       
  2773 Enables intrinsics for SHA\-384 and SHA\-512 crypto hash functions.
       
  2774 Flags that control intrinsics now require the option
       
  2775 \f[CB]\-XX:+UnlockDiagnosticVMOptions\f[R].
       
  2776 .RS
       
  2777 .RE
       
  2778 .TP
       
  2779 .B \f[CB]\-XX:+UseSuperWord\f[R]
       
  2780 Enables the transformation of scalar operations into superword
       
  2781 operations.
       
  2782 Superword is a vectorization optimization.
       
  2783 This option is enabled by default.
       
  2784 To disable the transformation of scalar operations into superword
       
  2785 operations, specify \f[CB]\-XX:\-UseSuperWord\f[R].
       
  2786 Only the Java HotSpot Server VM supports this option.
       
  2787 .RS
       
  2788 .RE
       
  2789 .SH ADVANCED SERVICEABILITY OPTIONS FOR JAVA
       
  2790 .PP
       
  2791 These \f[CB]java\f[R] options provide the ability to gather system
       
  2792 information and perform extensive debugging.
       
  2793 .TP
       
  2794 .B \f[CB]\-XX:+DisableAttachMechanism\f[R]
       
  2795 Disables the mechanism that lets tools attach to the JVM.
       
  2796 By default, this option is disabled, meaning that the attach mechanism
       
  2797 is enabled and you can use diagnostics and troubleshooting tools such as
       
  2798 \f[CB]jcmd\f[R], \f[CB]jstack\f[R], \f[CB]jmap\f[R], and \f[CB]jinfo\f[R].
       
  2799 .RS
       
  2800 .RS
       
  2801 .PP
       
  2802 \f[B]Note:\f[R] The tools such as \f[B]jcmd\f[R], \f[B]jinfo\f[R],
       
  2803 \f[B]jmap\f[R], and \f[B]jstack\f[R] shipped with the JDK aren\[aq]t
       
  2804 supported when using the tools from one JDK version to troubleshoot a
       
  2805 different JDK version.
       
  2806 .RE
       
  2807 .RE
       
  2808 .TP
       
  2809 .B \f[CB]\-XX:+ExtendedDTraceProbes\f[R]
       
  2810 \f[B]Oracle Solaris, Linux, and macOS:\f[R] Enables additional
       
  2811 \f[CB]dtrace\f[R] tool probes that affect the performance.
       
  2812 By default, this option is disabled and \f[CB]dtrace\f[R] performs only
       
  2813 standard probes.
       
  2814 .RS
       
  2815 .RE
       
  2816 .TP
       
  2817 .B \f[CB]\-XX:+HeapDumpOnOutOfMemoryError\f[R]
       
  2818 Enables the dumping of the Java heap to a file in the current directory
       
  2819 by using the heap profiler (HPROF) when a
       
  2820 \f[CB]java.lang.OutOfMemoryError\f[R] exception is thrown.
       
  2821 You can explicitly set the heap dump file path and name using the
       
  2822 \f[CB]\-XX:HeapDumpPath\f[R] option.
       
  2823 By default, this option is disabled and the heap isn\[aq]t dumped when
       
  2824 an \f[CB]OutOfMemoryError\f[R] exception is thrown.
       
  2825 .RS
       
  2826 .RE
       
  2827 .TP
       
  2828 .B \f[CB]\-XX:HeapDumpPath=path\f[R]
       
  2829 Sets the path and file name for writing the heap dump provided by the
       
  2830 heap profiler (HPROF) when the \f[CB]\-XX:+HeapDumpOnOutOfMemoryError\f[R]
       
  2831 option is set.
       
  2832 By default, the file is created in the current working directory, and
       
  2833 it\[aq]s named \f[CB]java_pid<pid>.hprof\f[R] where \f[CB]<pid>\f[R] is the
       
  2834 identifier of the process that caused the error.
       
  2835 The following example shows how to set the default file explicitly
       
  2836 (\f[CB]%p\f[R] represents the current process identifier):
       
  2837 .RS
       
  2838 .RS
       
  2839 .PP
       
  2840 \f[CB]\-XX:HeapDumpPath=./java_pid%p.hprof\f[R]
       
  2841 .RE
       
  2842 .IP \[bu] 2
       
  2843 \f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
       
  2844 how to set the heap dump file to
       
  2845 \f[CB]/var/log/java/java_heapdump.hprof\f[R]:
       
  2846 .RS 2
       
  2847 .RS
       
  2848 .PP
       
  2849 \f[CB]\-XX:HeapDumpPath=/var/log/java/java_heapdump.hprof\f[R]
       
  2850 .RE
       
  2851 .RE
       
  2852 .IP \[bu] 2
       
  2853 \f[B]Windows:\f[R] The following example shows how to set the heap dump
       
  2854 file to \f[CB]C:/log/java/java_heapdump.log\f[R]:
       
  2855 .RS 2
       
  2856 .RS
       
  2857 .PP
       
  2858 \f[CB]\-XX:HeapDumpPath=C:/log/java/java_heapdump.log\f[R]
       
  2859 .RE
       
  2860 .RE
       
  2861 .RE
       
  2862 .TP
       
  2863 .B \f[CB]\-XX:LogFile=\f[R]\f[I]path\f[R]
       
  2864 Sets the path and file name to where log data is written.
       
  2865 By default, the file is created in the current working directory, and
       
  2866 it\[aq]s named \f[CB]hotspot.log\f[R].
       
  2867 .RS
       
  2868 .IP \[bu] 2
       
  2869 \f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
       
  2870 how to set the log file to \f[CB]/var/log/java/hotspot.log\f[R]:
       
  2871 .RS 2
       
  2872 .RS
       
  2873 .PP
       
  2874 \f[CB]\-XX:LogFile=/var/log/java/hotspot.log\f[R]
       
  2875 .RE
       
  2876 .RE
       
  2877 .IP \[bu] 2
       
  2878 \f[B]Windows:\f[R] The following example shows how to set the log file to
       
  2879 \f[CB]C:/log/java/hotspot.log\f[R]:
       
  2880 .RS 2
       
  2881 .RS
       
  2882 .PP
       
  2883 \f[CB]\-XX:LogFile=C:/log/java/hotspot.log\f[R]
       
  2884 .RE
       
  2885 .RE
       
  2886 .RE
       
  2887 .TP
       
  2888 .B \f[CB]\-XX:+PrintClassHistogram\f[R]
       
  2889 Enables printing of a class instance histogram after one of the
       
  2890 following events:
       
  2891 .RS
       
  2892 .IP \[bu] 2
       
  2893 \f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]Control+Break\f[R]
       
  2894 .IP \[bu] 2
       
  2895 \f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R])
       
  2896 .PP
       
  2897 By default, this option is disabled.
       
  2898 .PP
       
  2899 Setting this option is equivalent to running the \f[CB]jmap\ \-histo\f[R]
       
  2900 command, or the \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]GC.class_histogram\f[R]
       
  2901 command, where \f[I]pid\f[R] is the current Java process identifier.
       
  2902 .RE
       
  2903 .TP
       
  2904 .B \f[CB]\-XX:+PrintConcurrentLocks\f[R]
       
  2905 Enables printing of \f[CB]java.util.concurrent\f[R] locks after one of the
       
  2906 following events:
       
  2907 .RS
       
  2908 .IP \[bu] 2
       
  2909 \f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]Control+Break\f[R]
       
  2910 .IP \[bu] 2
       
  2911 \f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R])
       
  2912 .PP
       
  2913 By default, this option is disabled.
       
  2914 .PP
       
  2915 Setting this option is equivalent to running the \f[CB]jstack\ \-l\f[R]
       
  2916 command or the \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]Thread.print\ \-l\f[R]
       
  2917 command, where \f[I]pid\f[R] is the current Java process identifier.
       
  2918 .RE
       
  2919 .TP
       
  2920 .B \f[CB]\-XX:+PrintFlagsRanges\f[R]
       
  2921 Prints the range specified and allows automatic testing of the values.
       
  2922 See \f[B]Validate Java Virtual Machine Flag Arguments\f[R].
       
  2923 .RS
       
  2924 .RE
       
  2925 .TP
       
  2926 .B \f[CB]\-XX:+PerfDataSaveToFile\f[R]
       
  2927 If enabled, saves \f[B]jstat\f[R] binary data when the Java application
       
  2928 exits.
       
  2929 This binary data is saved in a file named
       
  2930 \f[CB]hsperfdata_\f[R]\f[I]pid\f[R], where \f[I]pid\f[R] is the process
       
  2931 identifier of the Java application that you ran.
       
  2932 Use the \f[CB]jstat\f[R] command to display the performance data contained
       
  2933 in this file as follows:
       
  2934 .RS
       
  2935 .RS
       
  2936 .PP
       
  2937 \f[CB]jstat\ \-class\ file:///\f[R]\f[I]path\f[R]\f[CB]/hsperfdata_\f[R]\f[I]pid\f[R]
       
  2938 .RE
       
  2939 .RS
       
  2940 .PP
       
  2941 \f[CB]jstat\ \-gc\ file:///\f[R]\f[I]path\f[R]\f[CB]/hsperfdata_\f[R]\f[I]pid\f[R]
       
  2942 .RE
       
  2943 .RE
       
  2944 .TP
       
  2945 .B \f[CB]\-XX:+UsePerfData\f[R]
       
  2946 Enables the \f[CB]perfdata\f[R] feature.
       
  2947 This option is enabled by default to allow JVM monitoring and
       
  2948 performance testing.
       
  2949 Disabling it suppresses the creation of the \f[CB]hsperfdata_userid\f[R]
       
  2950 directories.
       
  2951 To disable the \f[CB]perfdata\f[R] feature, specify
       
  2952 \f[CB]\-XX:\-UsePerfData\f[R].
       
  2953 .RS
       
  2954 .RE
       
  2955 .SH ADVANCED GARBAGE COLLECTION OPTIONS FOR JAVA
       
  2956 .PP
       
  2957 These \f[CB]java\f[R] options control how garbage collection (GC) is
       
  2958 performed by the Java HotSpot VM.
       
  2959 .TP
       
  2960 .B \f[CB]\-XX:+AggressiveHeap\f[R]
       
  2961 Enables Java heap optimization.
       
  2962 This sets various parameters to be optimal for long\-running jobs with
       
  2963 intensive memory allocation, based on the configuration of the computer
       
  2964 (RAM and CPU).
       
  2965 By default, the option is disabled and the heap sizes are configured
       
  2966 less aggressively.
       
  2967 .RS
       
  2968 .RE
       
  2969 .TP
       
  2970 .B \f[CB]\-XX:+AlwaysPreTouch\f[R]
       
  2971 Requests the VM to touch every page on the Java heap after requesting it
       
  2972 from the operating system and before handing memory out to the
       
  2973 application.
       
  2974 By default, this option is disabled and all pages are committed as the
       
  2975 application uses the heap space.
       
  2976 .RS
       
  2977 .RE
       
  2978 .TP
       
  2979 .B \f[CB]\-XX:+CMSClassUnloadingEnabled\f[R]
       
  2980 Enables class unloading when using the concurrent mark\-sweep (CMS)
       
  2981 garbage collector.
       
  2982 This option is enabled by default.
       
  2983 To disable class unloading for the CMS garbage collector, specify
       
  2984 \f[CB]\-XX:\-CMSClassUnloadingEnabled\f[R].
       
  2985 .RS
       
  2986 .RE
       
  2987 .TP
       
  2988 .B \f[CB]\-XX:CMSExpAvgFactor=\f[R]\f[I]percent\f[R]
       
  2989 Sets the percentage of time (0 to 100) used to weight the current sample
       
  2990 when computing exponential averages for the concurrent collection
       
  2991 statistics.
       
  2992 By default, the exponential averages factor is set to 25%.
       
  2993 The following example shows how to set the factor to 15%:
       
  2994 .RS
       
  2995 .RS
       
  2996 .PP
       
  2997 \f[CB]\-XX:CMSExpAvgFactor=15\f[R]
       
  2998 .RE
       
  2999 .RE
       
  3000 .TP
       
  3001 .B \f[CB]\-XX:CMSInitiatingOccupancyFraction=\f[R]\f[I]percent\f[R]
       
  3002 Sets the percentage of the old generation occupancy (0 to 100) at which
       
  3003 to start a CMS collection cycle.
       
  3004 The default value is set to \-1.
       
  3005 Any negative value (including the default) implies that the option
       
  3006 \f[CB]\-XX:CMSTriggerRatio\f[R] is used to define the value of the
       
  3007 initiating occupancy fraction.
       
  3008 .RS
       
  3009 .PP
       
  3010 The following example shows how to set the factor to 20%:
       
  3011 .RS
       
  3012 .PP
       
  3013 \f[CB]\-XX:CMSInitiatingOccupancyFraction=20\f[R]
       
  3014 .RE
       
  3015 .RE
       
  3016 .TP
       
  3017 .B \f[CB]\-XX:CMSIncrementalDutySafetyFactor=\f[R]\f[I]percent\f[R]
       
  3018 Sets the percentage (0 to 100) used to add conservatism when computing
       
  3019 the duty cycle.
       
  3020 The default value is 10.
       
  3021 .RS
       
  3022 .RE
       
  3023 .TP
       
  3024 .B \f[CB]\-XX:+CMSScavengeBeforeRemark\f[R]
       
  3025 Enables scavenging attempts before the CMS remark step.
       
  3026 By default, this option is disabled.
       
  3027 .RS
       
  3028 .RE
       
  3029 .TP
       
  3030 .B \f[CB]\-XX:CMSTriggerRatio=percent\f[R]
       
  3031 Sets the percentage (0 to 100) of the value specified by the option
       
  3032 \f[CB]\-XX:MinHeapFreeRatio\f[R] that\[aq]s allocated before a CMS
       
  3033 collection cycle commences.
       
  3034 The default value is set to 80%.
       
  3035 .RS
       
  3036 .PP
       
  3037 The following example shows how to set the occupancy fraction to 75%:
       
  3038 .RS
       
  3039 .PP
       
  3040 \f[CB]\-XX:CMSTriggerRatio=75\f[R]
       
  3041 .RE
       
  3042 .RE
       
  3043 .TP
       
  3044 .B \f[CB]\-XX:ConcGCThreads=\f[R]\f[I]threads\f[R]
       
  3045 Sets the number of threads used for concurrent GC.
       
  3046 Sets \f[I]\f[CI]threads\f[I]\f[R] to approximately 1/4 of the number of
       
  3047 parallel garbage collection threads.
       
  3048 The default value depends on the number of CPUs available to the JVM.
       
  3049 .RS
       
  3050 .PP
       
  3051 For example, to set the number of threads for concurrent GC to 2,
       
  3052 specify the following option:
       
  3053 .RS
       
  3054 .PP
       
  3055 \f[CB]\-XX:ConcGCThreads=2\f[R]
       
  3056 .RE
       
  3057 .RE
       
  3058 .TP
       
  3059 .B \f[CB]\-XX:+DisableExplicitGC\f[R]
       
  3060 Enables the option that disables processing of calls to the
       
  3061 \f[CB]System.gc()\f[R] method.
       
  3062 This option is disabled by default, meaning that calls to
       
  3063 \f[CB]System.gc()\f[R] are processed.
       
  3064 If processing of calls to \f[CB]System.gc()\f[R] is disabled, then the JVM
       
  3065 still performs GC when necessary.
       
  3066 .RS
       
  3067 .RE
       
  3068 .TP
       
  3069 .B \f[CB]\-XX:+ExplicitGCInvokesConcurrent\f[R]
       
  3070 Enables invoking of concurrent GC by using the \f[CB]System.gc()\f[R]
       
  3071 request.
       
  3072 This option is disabled by default and can be enabled only with the
       
  3073 deprecated \f[CB]\-XX:+UseConcMarkSweepGC\f[R] option and the
       
  3074 \f[CB]\-XX:+UseG1GC\f[R] option.
       
  3075 .RS
       
  3076 .RE
       
  3077 .TP
       
  3078 .B \f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples=\f[R]\f[I]number\f[R]
       
  3079 When \f[CB]\-XX:UseAdaptiveIHOP\f[R] is enabled, this option sets the
       
  3080 number of completed marking cycles used to gather samples until G1
       
  3081 adaptively determines the optimum value of
       
  3082 \f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R].
       
  3083 Before, G1 uses the value of
       
  3084 \f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R] directly for this purpose.
       
  3085 The default value is 3.
       
  3086 .RS
       
  3087 .RE
       
  3088 .TP
       
  3089 .B \f[CB]\-XX:G1HeapRegionSize=size\f[R]
       
  3090 Sets the size of the regions into which the Java heap is subdivided when
       
  3091 using the garbage\-first (G1) collector.
       
  3092 The value is a power of 2 and can range from 1 MB to 32 MB.
       
  3093 The default region size is determined ergonomically based on the heap
       
  3094 size with a goal of approximately 2048 regions.
       
  3095 .RS
       
  3096 .PP
       
  3097 The following example sets the size of the subdivisions to 16 MB:
       
  3098 .RS
       
  3099 .PP
       
  3100 \f[CB]\-XX:G1HeapRegionSize=16m\f[R]
       
  3101 .RE
       
  3102 .RE
       
  3103 .TP
       
  3104 .B \f[CB]\-XX:G1HeapWastePercent=\f[R]\f[I]percent\f[R]
       
  3105 Sets the percentage of heap that you\[aq]re willing to waste.
       
  3106 The Java HotSpot VM doesn\[aq]t initiate the mixed garbage collection
       
  3107 cycle when the reclaimable percentage is less than the heap waste
       
  3108 percentage.
       
  3109 The default is 5 percent.
       
  3110 .RS
       
  3111 .RE
       
  3112 .TP
       
  3113 .B \f[CB]\-XX:G1MaxNewSizePercent=\f[R]\f[I]percent\f[R]
       
  3114 Sets the percentage of the heap size to use as the maximum for the young
       
  3115 generation size.
       
  3116 The default value is 60 percent of your Java heap.
       
  3117 .RS
       
  3118 .PP
       
  3119 This is an experimental flag.
       
  3120 This setting replaces the \f[CB]\-XX:DefaultMaxNewGenPercent\f[R] setting.
       
  3121 .RE
       
  3122 .TP
       
  3123 .B \f[CB]\-XX:G1MixedGCCountTarget=\f[R]\f[I]number\f[R]
       
  3124 Sets the target number of mixed garbage collections after a marking
       
  3125 cycle to collect old regions with at most
       
  3126 \f[CB]G1MixedGCLIveThresholdPercent\f[R] live data.
       
  3127 The default is 8 mixed garbage collections.
       
  3128 The goal for mixed collections is to be within this target number.
       
  3129 .RS
       
  3130 .RE
       
  3131 .TP
       
  3132 .B \f[CB]\-XX:G1MixedGCLiveThresholdPercent=\f[R]\f[I]percent\f[R]
       
  3133 Sets the occupancy threshold for an old region to be included in a mixed
       
  3134 garbage collection cycle.
       
  3135 The default occupancy is 85 percent.
       
  3136 .RS
       
  3137 .PP
       
  3138 This is an experimental flag.
       
  3139 This setting replaces the
       
  3140 \f[CB]\-XX:G1OldCSetRegionLiveThresholdPercent\f[R] setting.
       
  3141 .RE
       
  3142 .TP
       
  3143 .B \f[CB]\-XX:G1NewSizePercent=\f[R]\f[I]percent\f[R]
       
  3144 Sets the percentage of the heap to use as the minimum for the young
       
  3145 generation size.
       
  3146 The default value is 5 percent of your Java heap.
       
  3147 .RS
       
  3148 .PP
       
  3149 This is an experimental flag.
       
  3150 This setting replaces the \f[CB]\-XX:DefaultMinNewGenPercent\f[R] setting.
       
  3151 .RE
       
  3152 .TP
       
  3153 .B \f[CB]\-XX:G1OldCSetRegionThresholdPercent=\f[R]\f[I]percent\f[R]
       
  3154 Sets an upper limit on the number of old regions to be collected during
       
  3155 a mixed garbage collection cycle.
       
  3156 The default is 10 percent of the Java heap.
       
  3157 .RS
       
  3158 .RE
       
  3159 .TP
       
  3160 .B \f[CB]\-XX:G1ReservePercent=\f[R]\f[I]percent\f[R]
       
  3161 Sets the percentage of the heap (0 to 50) that\[aq]s reserved as a false
       
  3162 ceiling to reduce the possibility of promotion failure for the G1
       
  3163 collector.
       
  3164 When you increase or decrease the percentage, ensure that you adjust the
       
  3165 total Java heap by the same amount.
       
  3166 By default, this option is set to 10%.
       
  3167 .RS
       
  3168 .PP
       
  3169 The following example sets the reserved heap to 20%:
       
  3170 .RS
       
  3171 .PP
       
  3172 \f[CB]\-XX:G1ReservePercent=20\f[R]
       
  3173 .RE
       
  3174 .RE
       
  3175 .TP
       
  3176 .B \f[CB]\-XX:+G1UseAdaptiveIHOP\f[R]
       
  3177 Controls adaptive calculation of the old generation occupancy to start
       
  3178 background work preparing for an old generation collection.
       
  3179 If enabled, G1 uses \f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R] for the
       
  3180 first few times as specified by the value of
       
  3181 \f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R], and after that adaptively
       
  3182 calculates a new optimum value for the initiating occupancy
       
  3183 automatically.
       
  3184 Otherwise, the old generation collection process always starts at the
       
  3185 old generation occupancy determined by
       
  3186 \f[CB]\-XX:InitiatingHeapOccupancyPercent\f[R].
       
  3187 .RS
       
  3188 .PP
       
  3189 The default is enabled.
       
  3190 .RE
       
  3191 .TP
       
  3192 .B \f[CB]\-XX:InitialHeapSize=\f[R]\f[I]size\f[R]
       
  3193 Sets the initial size (in bytes) of the memory allocation pool.
       
  3194 This value must be either 0, or a multiple of 1024 and greater than 1
       
  3195 MB.
       
  3196 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  3197 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  3198 \f[CB]G\f[R] to indicate gigabytes.
       
  3199 The default value is selected at run time based on the system
       
  3200 configuration.
       
  3201 .RS
       
  3202 .PP
       
  3203 The following examples show how to set the size of allocated memory to 6
       
  3204 MB using various units:
       
  3205 .IP
       
  3206 .nf
       
  3207 \f[CB]
       
  3208 \-XX:InitialHeapSize=6291456
       
  3209 \-XX:InitialHeapSize=6144k
       
  3210 \-XX:InitialHeapSize=6m
       
  3211 \f[R]
       
  3212 .fi
       
  3213 .PP
       
  3214 If you set this option to 0, then the initial size is set as the sum of
       
  3215 the sizes allocated for the old generation and the young generation.
       
  3216 The size of the heap for the young generation can be set using the
       
  3217 \f[CB]\-XX:NewSize\f[R] option.
       
  3218 .RE
       
  3219 .TP
       
  3220 .B \f[CB]\-XX:InitialRAMPercentage=\f[R]\f[I]percent\f[R]
       
  3221 Sets the initial amount of memory that the JVM will use for the Java
       
  3222 heap before applying ergonomics heuristics as a percentage of the
       
  3223 maximum amount determined as described in the \f[CB]\-XX:MaxRAM\f[R]
       
  3224 option.
       
  3225 The default value is 1.5625 percent.
       
  3226 .RS
       
  3227 .PP
       
  3228 The following example shows how to set the percentage of the initial
       
  3229 amount of memory used for the Java heap:
       
  3230 .RS
       
  3231 .PP
       
  3232 \f[CB]\-XX:InitialRAMPercentage=5\f[R]
       
  3233 .RE
       
  3234 .RE
       
  3235 .TP
       
  3236 .B \f[CB]\-XX:InitialSurvivorRatio=\f[R]\f[I]ratio\f[R]
       
  3237 Sets the initial survivor space ratio used by the throughput garbage
       
  3238 collector (which is enabled by the \f[CB]\-XX:+UseParallelGC\f[R] and/or
       
  3239 \f[CB]\-XX:+UseParallelOldGC\f[R] options).
       
  3240 Adaptive sizing is enabled by default with the throughput garbage
       
  3241 collector by using the \f[CB]\-XX:+UseParallelGC\f[R] and
       
  3242 \f[CB]\-XX:+UseParallelOldGC\f[R] options, and the survivor space is
       
  3243 resized according to the application behavior, starting with the initial
       
  3244 value.
       
  3245 If adaptive sizing is disabled (using the
       
  3246 \f[CB]\-XX:\-UseAdaptiveSizePolicy\f[R] option), then the
       
  3247 \f[CB]\-XX:SurvivorRatio\f[R] option should be used to set the size of the
       
  3248 survivor space for the entire execution of the application.
       
  3249 .RS
       
  3250 .PP
       
  3251 The following formula can be used to calculate the initial size of
       
  3252 survivor space (S) based on the size of the young generation (Y), and
       
  3253 the initial survivor space ratio (R):
       
  3254 .RS
       
  3255 .PP
       
  3256 \f[CB]S=Y/(R+2)\f[R]
       
  3257 .RE
       
  3258 .PP
       
  3259 The 2 in the equation denotes two survivor spaces.
       
  3260 The larger the value specified as the initial survivor space ratio, the
       
  3261 smaller the initial survivor space size.
       
  3262 .PP
       
  3263 By default, the initial survivor space ratio is set to 8.
       
  3264 If the default value for the young generation space size is used (2 MB),
       
  3265 then the initial size of the survivor space is 0.2 MB.
       
  3266 .PP
       
  3267 The following example shows how to set the initial survivor space ratio
       
  3268 to 4:
       
  3269 .RS
       
  3270 .PP
       
  3271 \f[CB]\-XX:InitialSurvivorRatio=4\f[R]
       
  3272 .RE
       
  3273 .RE
       
  3274 .TP
       
  3275 .B \f[CB]\-XX:InitiatingHeapOccupancyPercent=\f[R]\f[I]percent\f[R]
       
  3276 Sets the percentage of the old generation occupancy (0 to 100) at which
       
  3277 to start the first few concurrent marking cycles for the G1 garbage
       
  3278 collector.
       
  3279 .RS
       
  3280 .PP
       
  3281 By default, the initiating value is set to 45%.
       
  3282 A value of 0 implies nonstop concurrent GC cycles from the beginning
       
  3283 until G1 adaptively sets this value.
       
  3284 .PP
       
  3285 See also the \f[CB]\-XX:G1UseAdaptiveIHOP\f[R] and
       
  3286 \f[CB]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R] options.
       
  3287 .PP
       
  3288 The following example shows how to set the initiating heap occupancy to
       
  3289 75%:
       
  3290 .RS
       
  3291 .PP
       
  3292 \f[CB]\-XX:InitiatingHeapOccupancyPercent=75\f[R]
       
  3293 .RE
       
  3294 .RE
       
  3295 .TP
       
  3296 .B \f[CB]\-XX:MaxGCPauseMillis=\f[R]\f[I]time\f[R]
       
  3297 Sets a target for the maximum GC pause time (in milliseconds).
       
  3298 This is a soft goal, and the JVM will make its best effort to achieve
       
  3299 it.
       
  3300 The specified value doesn\[aq]t adapt to your heap size.
       
  3301 By default, for G1 the maximum pause time target is 200 milliseconds.
       
  3302 The other generational collectors do not use a pause time goal by
       
  3303 default.
       
  3304 .RS
       
  3305 .PP
       
  3306 The following example shows how to set the maximum target pause time to
       
  3307 500 ms:
       
  3308 .RS
       
  3309 .PP
       
  3310 \f[CB]\-XX:MaxGCPauseMillis=500\f[R]
       
  3311 .RE
       
  3312 .RE
       
  3313 .TP
       
  3314 .B \f[CB]\-XX:MaxHeapSize=\f[R]\f[I]size\f[R]
       
  3315 Sets the maximum size (in byes) of the memory allocation pool.
       
  3316 This value must be a multiple of 1024 and greater than 2 MB.
       
  3317 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  3318 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  3319 \f[CB]G\f[R] to indicate gigabytes.
       
  3320 The default value is selected at run time based on the system
       
  3321 configuration.
       
  3322 For server deployments, the options \f[CB]\-XX:InitialHeapSize\f[R] and
       
  3323 \f[CB]\-XX:MaxHeapSize\f[R] are often set to the same value.
       
  3324 .RS
       
  3325 .PP
       
  3326 The following examples show how to set the maximum allowed size of
       
  3327 allocated memory to 80 MB using various units:
       
  3328 .IP
       
  3329 .nf
       
  3330 \f[CB]
       
  3331 \-XX:MaxHeapSize=83886080
       
  3332 \-XX:MaxHeapSize=81920k
       
  3333 \-XX:MaxHeapSize=80m
       
  3334 \f[R]
       
  3335 .fi
       
  3336 .PP
       
  3337 The \f[CB]\-XX:MaxHeapSize\f[R] option is equivalent to \f[CB]\-Xmx\f[R].
       
  3338 .RE
       
  3339 .TP
       
  3340 .B \f[CB]\-XX:MaxHeapFreeRatio=\f[R]\f[I]percent\f[R]
       
  3341 Sets the maximum allowed percentage of free heap space (0 to 100) after
       
  3342 a GC event.
       
  3343 If free heap space expands above this value, then the heap is shrunk.
       
  3344 By default, this value is set to 70%.
       
  3345 .RS
       
  3346 .PP
       
  3347 Minimize the Java heap size by lowering the values of the parameters
       
  3348 \f[CB]MaxHeapFreeRatio\f[R] (default value is 70%) and
       
  3349 \f[CB]MinHeapFreeRatio\f[R] (default value is 40%) with the command\-line
       
  3350 options \f[CB]\-XX:MaxHeapFreeRatio\f[R] and
       
  3351 \f[CB]\-XX:MinHeapFreeRatio\f[R].
       
  3352 Lowering \f[CB]MaxHeapFreeRatio\f[R] to as low as 10% and
       
  3353 \f[CB]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size
       
  3354 without too much performance regression; however, results may vary
       
  3355 greatly depending on your application.
       
  3356 Try different values for these parameters until they\[aq]re as low as
       
  3357 possible yet still retain acceptable performance.
       
  3358 .RS
       
  3359 .PP
       
  3360 \f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R]
       
  3361 .RE
       
  3362 .PP
       
  3363 Customers trying to keep the heap small should also add the option
       
  3364 \f[CB]\-XX:\-ShrinkHeapInSteps\f[R].
       
  3365 See \f[B]Performance Tuning Examples\f[R] for a description of using this
       
  3366 option to keep the Java heap small by reducing the dynamic footprint for
       
  3367 embedded applications.
       
  3368 .RE
       
  3369 .TP
       
  3370 .B \f[CB]\-XX:MaxMetaspaceSize=\f[R]\f[I]size\f[R]
       
  3371 Sets the maximum amount of native memory that can be allocated for class
       
  3372 metadata.
       
  3373 By default, the size isn\[aq]t limited.
       
  3374 The amount of metadata for an application depends on the application
       
  3375 itself, other running applications, and the amount of memory available
       
  3376 on the system.
       
  3377 .RS
       
  3378 .PP
       
  3379 The following example shows how to set the maximum class metadata size
       
  3380 to 256 MB:
       
  3381 .RS
       
  3382 .PP
       
  3383 \f[CB]\-XX:MaxMetaspaceSize=256m\f[R]
       
  3384 .RE
       
  3385 .RE
       
  3386 .TP
       
  3387 .B \f[CB]\-XX:MaxNewSize=\f[R]\f[I]size\f[R]
       
  3388 Sets the maximum size (in bytes) of the heap for the young generation
       
  3389 (nursery).
       
  3390 The default value is set ergonomically.
       
  3391 .RS
       
  3392 .RE
       
  3393 .TP
       
  3394 .B \f[CB]\-XX:MaxRAM=\f[R]\f[I]size\f[R]
       
  3395 Sets the maximum amount of memory that the JVM may use for the Java heap
       
  3396 before applying ergonomics heuristics.
       
  3397 The default value is the maximum amount of available memory to the JVM
       
  3398 process or 128 GB, whichever is lower.
       
  3399 .RS
       
  3400 .PP
       
  3401 The maximum amount of available memory to the JVM process is the minimum
       
  3402 of the machine\[aq]s physical memory and any constraints set by the
       
  3403 environment (e.g.
       
  3404 container).
       
  3405 .PP
       
  3406 Specifying this option disables automatic use of compressed oops if the
       
  3407 combined result of this and other options influencing the maximum amount
       
  3408 of memory is larger than the range of memory addressable by compressed
       
  3409 oops.
       
  3410 See \f[CB]\-XX:UseCompressedOops\f[R] for further information about
       
  3411 compressed oops.
       
  3412 .PP
       
  3413 The following example shows how to set the maximum amount of available
       
  3414 memory for sizing the Java heap to 2 GB:
       
  3415 .RS
       
  3416 .PP
       
  3417 \f[CB]\-XX:MaxRAM=2G\f[R]
       
  3418 .RE
       
  3419 .RE
       
  3420 .TP
       
  3421 .B \f[CB]\-XX:MaxRAMPercentage=\f[R]\f[I]percent\f[R]
       
  3422 Sets the maximum amount of memory that the JVM may use for the Java heap
       
  3423 before applying ergonomics heuristics as a percentage of the maximum
       
  3424 amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option.
       
  3425 The default value is 25 percent.
       
  3426 .RS
       
  3427 .PP
       
  3428 Specifying this option disables automatic use of compressed oops if the
       
  3429 combined result of this and other options influencing the maximum amount
       
  3430 of memory is larger than the range of memory addressable by compressed
       
  3431 oops.
       
  3432 See \f[CB]\-XX:UseCompressedOops\f[R] for further information about
       
  3433 compressed oops.
       
  3434 .PP
       
  3435 The following example shows how to set the percentage of the maximum
       
  3436 amount of memory used for the Java heap:
       
  3437 .RS
       
  3438 .PP
       
  3439 \f[CB]\-XX:MaxRAMPercentage=75\f[R]
       
  3440 .RE
       
  3441 .RE
       
  3442 .TP
       
  3443 .B \f[CB]\-XX:MinRAMPercentage=\f[R]\f[I]percent\f[R]
       
  3444 Sets the maximum amount of memory that the JVM may use for the Java heap
       
  3445 before applying ergonomics heuristics as a percentage of the maximum
       
  3446 amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option for
       
  3447 small heaps.
       
  3448 A small heap is a heap of approximately 125 MB.
       
  3449 The default value is 50 percent.
       
  3450 .RS
       
  3451 .PP
       
  3452 The following example shows how to set the percentage of the maximum
       
  3453 amount of memory used for the Java heap for small heaps:
       
  3454 .RS
       
  3455 .PP
       
  3456 \f[CB]\-XX:MinRAMPercentage=75\f[R]
       
  3457 .RE
       
  3458 .RE
       
  3459 .TP
       
  3460 .B \f[CB]\-XX:MaxTenuringThreshold=\f[R]\f[I]threshold\f[R]
       
  3461 Sets the maximum tenuring threshold for use in adaptive GC sizing.
       
  3462 The largest value is 15.
       
  3463 The default value is 15 for the parallel (throughput) collector, and 6
       
  3464 for the CMS collector.
       
  3465 .RS
       
  3466 .PP
       
  3467 The following example shows how to set the maximum tenuring threshold to
       
  3468 10:
       
  3469 .RS
       
  3470 .PP
       
  3471 \f[CB]\-XX:MaxTenuringThreshold=10\f[R]
       
  3472 .RE
       
  3473 .RE
       
  3474 .TP
       
  3475 .B \f[CB]\-XX:MetaspaceSize=\f[R]\f[I]size\f[R]
       
  3476 Sets the size of the allocated class metadata space that triggers a
       
  3477 garbage collection the first time it\[aq]s exceeded.
       
  3478 This threshold for a garbage collection is increased or decreased
       
  3479 depending on the amount of metadata used.
       
  3480 The default size depends on the platform.
       
  3481 .RS
       
  3482 .RE
       
  3483 .TP
       
  3484 .B \f[CB]\-XX:MinHeapFreeRatio=\f[R]\f[I]percent\f[R]
       
  3485 Sets the minimum allowed percentage of free heap space (0 to 100) after
       
  3486 a GC event.
       
  3487 If free heap space falls below this value, then the heap is expanded.
       
  3488 By default, this value is set to 40%.
       
  3489 .RS
       
  3490 .PP
       
  3491 Minimize Java heap size by lowering the values of the parameters
       
  3492 \f[CB]MaxHeapFreeRatio\f[R] (default value is 70%) and
       
  3493 \f[CB]MinHeapFreeRatio\f[R] (default value is 40%) with the command\-line
       
  3494 options \f[CB]\-XX:MaxHeapFreeRatio\f[R] and
       
  3495 \f[CB]\-XX:MinHeapFreeRatio\f[R].
       
  3496 Lowering \f[CB]MaxHeapFreeRatio\f[R] to as low as 10% and
       
  3497 \f[CB]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size
       
  3498 without too much performance regression; however, results may vary
       
  3499 greatly depending on your application.
       
  3500 Try different values for these parameters until they\[aq]re as low as
       
  3501 possible, yet still retain acceptable performance.
       
  3502 .RS
       
  3503 .PP
       
  3504 \f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R]
       
  3505 .RE
       
  3506 .PP
       
  3507 Customers trying to keep the heap small should also add the option
       
  3508 \f[CB]\-XX:\-ShrinkHeapInSteps\f[R].
       
  3509 See \f[B]Performance Tuning Examples\f[R] for a description of using this
       
  3510 option to keep the Java heap small by reducing the dynamic footprint for
       
  3511 embedded applications.
       
  3512 .RE
       
  3513 .TP
       
  3514 .B \f[CB]\-XX:MinHeapSize=\f[R]\f[I]size\f[R]
       
  3515 Sets the minimum size (in bytes) of the memory allocation pool.
       
  3516 This value must be either 0, or a multiple of 1024 and greater than 1
       
  3517 MB.
       
  3518 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  3519 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  3520 \f[CB]G\f[R] to indicate gigabytes.
       
  3521 The default value is selected at run time based on the system
       
  3522 configuration.
       
  3523 .RS
       
  3524 .PP
       
  3525 The following examples show how to set the mimimum size of allocated
       
  3526 memory to 6 MB using various units:
       
  3527 .IP
       
  3528 .nf
       
  3529 \f[CB]
       
  3530 \-XX:MinHeapSize=6291456
       
  3531 \-XX:MinHeapSize=6144k
       
  3532 \-XX:MinHeapSize=6m
       
  3533 \f[R]
       
  3534 .fi
       
  3535 .PP
       
  3536 If you set this option to 0, then the minimum size is set to the same
       
  3537 value as the initial size.
       
  3538 .RE
       
  3539 .TP
       
  3540 .B \f[CB]\-XX:NewRatio=\f[R]\f[I]ratio\f[R]
       
  3541 Sets the ratio between young and old generation sizes.
       
  3542 By default, this option is set to 2.
       
  3543 The following example shows how to set the young\-to\-old ratio to 1:
       
  3544 .RS
       
  3545 .RS
       
  3546 .PP
       
  3547 \f[CB]\-XX:NewRatio=1\f[R]
       
  3548 .RE
       
  3549 .RE
       
  3550 .TP
       
  3551 .B \f[CB]\-XX:NewSize=\f[R]\f[I]size\f[R]
       
  3552 Sets the initial size (in bytes) of the heap for the young generation
       
  3553 (nursery).
       
  3554 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  3555 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  3556 \f[CB]G\f[R] to indicate gigabytes.
       
  3557 .RS
       
  3558 .PP
       
  3559 The young generation region of the heap is used for new objects.
       
  3560 GC is performed in this region more often than in other regions.
       
  3561 If the size for the young generation is too low, then a large number of
       
  3562 minor GCs are performed.
       
  3563 If the size is too high, then only full GCs are performed, which can
       
  3564 take a long time to complete.
       
  3565 It is recommended that you keep the size for the young generation
       
  3566 greater than 25% and less than 50% of the overall heap size.
       
  3567 .PP
       
  3568 The following examples show how to set the initial size of the young
       
  3569 generation to 256 MB using various units:
       
  3570 .IP
       
  3571 .nf
       
  3572 \f[CB]
       
  3573 \-XX:NewSize=256m
       
  3574 \-XX:NewSize=262144k
       
  3575 \-XX:NewSize=268435456
       
  3576 \f[R]
       
  3577 .fi
       
  3578 .PP
       
  3579 The \f[CB]\-XX:NewSize\f[R] option is equivalent to \f[CB]\-Xmn\f[R].
       
  3580 .RE
       
  3581 .TP
       
  3582 .B \f[CB]\-XX:ParallelGCThreads=\f[R]\f[I]threads\f[R]
       
  3583 Sets the number of the stop\-the\-world (STW) worker threads.
       
  3584 The default value depends on the number of CPUs available to the JVM and
       
  3585 the garbage collector selected.
       
  3586 .RS
       
  3587 .PP
       
  3588 For example, to set the number of threads for G1 GC to 2, specify the
       
  3589 following option:
       
  3590 .RS
       
  3591 .PP
       
  3592 \f[CB]\-XX:ParallelGCThreads=2\f[R]
       
  3593 .RE
       
  3594 .RE
       
  3595 .TP
       
  3596 .B \f[CB]\-XX:+ParallelRefProcEnabled\f[R]
       
  3597 Enables parallel reference processing.
       
  3598 By default, this option is disabled.
       
  3599 .RS
       
  3600 .RE
       
  3601 .TP
       
  3602 .B \f[CB]\-XX:+PrintAdaptiveSizePolicy\f[R]
       
  3603 Enables printing of information about adaptive\-generation sizing.
       
  3604 By default, this option is disabled.
       
  3605 .RS
       
  3606 .RE
       
  3607 .TP
       
  3608 .B \f[CB]\-XX:+ScavengeBeforeFullGC\f[R]
       
  3609 Enables GC of the young generation before each full GC.
       
  3610 This option is enabled by default.
       
  3611 It is recommended that you \f[I]don\[aq]t\f[R] disable it, because
       
  3612 scavenging the young generation before a full GC can reduce the number
       
  3613 of objects reachable from the old generation space into the young
       
  3614 generation space.
       
  3615 To disable GC of the young generation before each full GC, specify the
       
  3616 option \f[CB]\-XX:\-ScavengeBeforeFullGC\f[R].
       
  3617 .RS
       
  3618 .RE
       
  3619 .TP
       
  3620 .B \f[CB]\-XX:SoftRefLRUPolicyMSPerMB=\f[R]\f[I]time\f[R]
       
  3621 Sets the amount of time (in milliseconds) a softly reachable object is
       
  3622 kept active on the heap after the last time it was referenced.
       
  3623 The default value is one second of lifetime per free megabyte in the
       
  3624 heap.
       
  3625 The \f[CB]\-XX:SoftRefLRUPolicyMSPerMB\f[R] option accepts integer values
       
  3626 representing milliseconds per one megabyte of the current heap size (for
       
  3627 Java HotSpot Client VM) or the maximum possible heap size (for Java
       
  3628 HotSpot Server VM).
       
  3629 This difference means that the Client VM tends to flush soft references
       
  3630 rather than grow the heap, whereas the Server VM tends to grow the heap
       
  3631 rather than flush soft references.
       
  3632 In the latter case, the value of the \f[CB]\-Xmx\f[R] option has a
       
  3633 significant effect on how quickly soft references are garbage collected.
       
  3634 .RS
       
  3635 .PP
       
  3636 The following example shows how to set the value to 2.5 seconds:
       
  3637 .PP
       
  3638 \f[CB]\-XX:SoftRefLRUPolicyMSPerMB=2500\f[R]
       
  3639 .RE
       
  3640 .TP
       
  3641 .B \f[CB]\-XX:\-ShrinkHeapInSteps\f[R]
       
  3642 Incrementally reduces the Java heap to the target size, specified by the
       
  3643 option \f[CB]\-XX:MaxHeapFreeRatio\f[R].
       
  3644 This option is enabled by default.
       
  3645 If disabled, then it immediately reduces the Java heap to the target
       
  3646 size instead of requiring multiple garbage collection cycles.
       
  3647 Disable this option if you want to minimize the Java heap size.
       
  3648 You will likely encounter performance degradation when this option is
       
  3649 disabled.
       
  3650 .RS
       
  3651 .PP
       
  3652 See \f[B]Performance Tuning Examples\f[R] for a description of using the
       
  3653 \f[CB]MaxHeapFreeRatio\f[R] option to keep the Java heap small by reducing
       
  3654 the dynamic footprint for embedded applications.
       
  3655 .RE
       
  3656 .TP
       
  3657 .B \f[CB]\-XX:StringDeduplicationAgeThreshold=\f[R]\f[I]threshold\f[R]
       
  3658 Identifies \f[CB]String\f[R] objects reaching the specified age that are
       
  3659 considered candidates for deduplication.
       
  3660 An object\[aq]s age is a measure of how many times it has survived
       
  3661 garbage collection.
       
  3662 This is sometimes referred to as tenuring.
       
  3663 .RS
       
  3664 .RS
       
  3665 .PP
       
  3666 \f[B]Note:\f[R] \f[CB]String\f[R] objects that are promoted to an old heap
       
  3667 region before this age has been reached are always considered candidates
       
  3668 for deduplication.
       
  3669 The default value for this option is \f[CB]3\f[R].
       
  3670 See the \f[CB]\-XX:+UseStringDeduplication\f[R] option.
       
  3671 .RE
       
  3672 .RE
       
  3673 .TP
       
  3674 .B \f[CB]\-XX:SurvivorRatio=\f[R]\f[I]ratio\f[R]
       
  3675 Sets the ratio between eden space size and survivor space size.
       
  3676 By default, this option is set to 8.
       
  3677 The following example shows how to set the eden/survivor space ratio to
       
  3678 4:
       
  3679 .RS
       
  3680 .RS
       
  3681 .PP
       
  3682 \f[CB]\-XX:SurvivorRatio=4\f[R]
       
  3683 .RE
       
  3684 .RE
       
  3685 .TP
       
  3686 .B \f[CB]\-XX:TargetSurvivorRatio=\f[R]\f[I]percent\f[R]
       
  3687 Sets the desired percentage of survivor space (0 to 100) used after
       
  3688 young garbage collection.
       
  3689 By default, this option is set to 50%.
       
  3690 .RS
       
  3691 .PP
       
  3692 The following example shows how to set the target survivor space ratio
       
  3693 to 30%:
       
  3694 .RS
       
  3695 .PP
       
  3696 \f[CB]\-XX:TargetSurvivorRatio=30\f[R]
       
  3697 .RE
       
  3698 .RE
       
  3699 .TP
       
  3700 .B \f[CB]\-XX:TLABSize=\f[R]\f[I]size\f[R]
       
  3701 Sets the initial size (in bytes) of a thread\-local allocation buffer
       
  3702 (TLAB).
       
  3703 Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
       
  3704 \f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
       
  3705 \f[CB]G\f[R] to indicate gigabytes.
       
  3706 If this option is set to 0, then the JVM selects the initial size
       
  3707 automatically.
       
  3708 .RS
       
  3709 .PP
       
  3710 The following example shows how to set the initial TLAB size to 512 KB:
       
  3711 .RS
       
  3712 .PP
       
  3713 \f[CB]\-XX:TLABSize=512k\f[R]
       
  3714 .RE
       
  3715 .RE
       
  3716 .TP
       
  3717 .B \f[CB]\-XX:+UseAdaptiveSizePolicy\f[R]
       
  3718 Enables the use of adaptive generation sizing.
       
  3719 This option is enabled by default.
       
  3720 To disable adaptive generation sizing, specify
       
  3721 \f[CB]\-XX:\-UseAdaptiveSizePolicy\f[R] and set the size of the memory
       
  3722 allocation pool explicitly.
       
  3723 See the \f[CB]\-XX:SurvivorRatio\f[R] option.
       
  3724 .RS
       
  3725 .RE
       
  3726 .TP
       
  3727 .B \f[CB]\-XX:+UseCMSInitiatingOccupancyOnly\f[R]
       
  3728 Enables the use of the occupancy value as the only criterion for
       
  3729 initiating the CMS collector.
       
  3730 By default, this option is disabled and other criteria may be used.
       
  3731 .RS
       
  3732 .RE
       
  3733 .TP
       
  3734 .B \f[CB]\-XX:+UseG1GC\f[R]
       
  3735 Enables the use of the garbage\-first (G1) garbage collector.
       
  3736 It\[aq]s a server\-style garbage collector, targeted for multiprocessor
       
  3737 machines with a large amount of RAM.
       
  3738 This option meets GC pause time goals with high probability, while
       
  3739 maintaining good throughput.
       
  3740 The G1 collector is recommended for applications requiring large heaps
       
  3741 (sizes of around 6 GB or larger) with limited GC latency requirements (a
       
  3742 stable and predictable pause time below 0.5 seconds).
       
  3743 By default, this option is enabled and G1 is used as the default garbage
       
  3744 collector.
       
  3745 .RS
       
  3746 .RE
       
  3747 .TP
       
  3748 .B \f[CB]\-XX:+UseGCOverheadLimit\f[R]
       
  3749 Enables the use of a policy that limits the proportion of time spent by
       
  3750 the JVM on GC before an \f[CB]OutOfMemoryError\f[R] exception is thrown.
       
  3751 This option is enabled, by default, and the parallel GC will throw an
       
  3752 \f[CB]OutOfMemoryError\f[R] if more than 98% of the total time is spent on
       
  3753 garbage collection and less than 2% of the heap is recovered.
       
  3754 When the heap is small, this feature can be used to prevent applications
       
  3755 from running for long periods of time with little or no progress.
       
  3756 To disable this option, specify the option
       
  3757 \f[CB]\-XX:\-UseGCOverheadLimit\f[R].
       
  3758 .RS
       
  3759 .RE
       
  3760 .TP
       
  3761 .B \f[CB]\-XX:+UseNUMA\f[R]
       
  3762 Enables performance optimization of an application on a machine with
       
  3763 nonuniform memory architecture (NUMA) by increasing the
       
  3764 application\[aq]s use of lower latency memory.
       
  3765 By default, this option is disabled and no optimization for NUMA is
       
  3766 made.
       
  3767 The option is available only when the parallel garbage collector is used
       
  3768 (\f[CB]\-XX:+UseParallelGC\f[R]).
       
  3769 .RS
       
  3770 .RE
       
  3771 .TP
       
  3772 .B \f[CB]\-XX:+UseParallelGC\f[R]
       
  3773 Enables the use of the parallel scavenge garbage collector (also known
       
  3774 as the throughput collector) to improve the performance of your
       
  3775 application by leveraging multiple processors.
       
  3776 .RS
       
  3777 .PP
       
  3778 By default, this option is disabled and the default collector is used.
       
  3779 If it\[aq]s enabled, then the \f[CB]\-XX:+UseParallelOldGC\f[R] option is
       
  3780 automatically enabled, unless you explicitly disable it.
       
  3781 .RE
       
  3782 .TP
       
  3783 .B \f[CB]\-XX:+UseParallelOldGC\f[R]
       
  3784 Enables the use of the parallel garbage collector for full GCs.
       
  3785 By default, this option is disabled.
       
  3786 Enabling it automatically enables the \f[CB]\-XX:+UseParallelGC\f[R]
       
  3787 option.
       
  3788 .RS
       
  3789 .RE
       
  3790 .TP
       
  3791 .B \f[CB]\-XX:+UseSerialGC\f[R]
       
  3792 Enables the use of the serial garbage collector.
       
  3793 This is generally the best choice for small and simple applications that
       
  3794 don\[aq]t require any special functionality from garbage collection.
       
  3795 By default, this option is disabled and the default collector is used.
       
  3796 .RS
       
  3797 .RE
       
  3798 .TP
       
  3799 .B \f[CB]\-XX:+UseSHM\f[R]
       
  3800 \f[B]Linux only:\f[R] Enables the JVM to use shared memory to set up
       
  3801 large pages.
       
  3802 .RS
       
  3803 .PP
       
  3804 See \f[B]Large Pages\f[R] for setting up large pages.
       
  3805 .RE
       
  3806 .TP
       
  3807 .B \f[CB]\-XX:+UseStringDeduplication\f[R]
       
  3808 Enables string deduplication.
       
  3809 By default, this option is disabled.
       
  3810 To use this option, you must enable the garbage\-first (G1) garbage
       
  3811 collector.
       
  3812 .RS
       
  3813 .PP
       
  3814 String deduplication reduces the memory footprint of \f[CB]String\f[R]
       
  3815 objects on the Java heap by taking advantage of the fact that many
       
  3816 \f[CB]String\f[R] objects are identical.
       
  3817 Instead of each \f[CB]String\f[R] object pointing to its own character
       
  3818 array, identical \f[CB]String\f[R] objects can point to and share the same
       
  3819 character array.
       
  3820 .RE
       
  3821 .TP
       
  3822 .B \f[CB]\-XX:+UseTLAB\f[R]
       
  3823 Enables the use of thread\-local allocation blocks (TLABs) in the young
       
  3824 generation space.
       
  3825 This option is enabled by default.
       
  3826 To disable the use of TLABs, specify the option \f[CB]\-XX:\-UseTLAB\f[R].
       
  3827 .RS
       
  3828 .RE
       
  3829 .TP
       
  3830 .B \f[CB]\-XX:+UseZGC\f[R]
       
  3831 Enables the use of the Z garbage collector.
       
  3832 This garbage collector is best for providing lowest latency with large
       
  3833 Java heaps at some throughput cost.
       
  3834 This is an experimental garbage collector, you need to specify
       
  3835 \f[CB]\-XX:+UnlockExperimentalVMOptions\f[R] before \f[CB]\-XX:+UseZGC\f[R]
       
  3836 on the command line.
       
  3837 .RS
       
  3838 .PP
   747 Example:
  3839 Example:
   748 .sp
  3840 .RS
   749 .if n \{\
  3841 .PP
   750 .RS 4
  3842 \f[CB]\-XX:+UnlockExperimentalVMOptions\ \-XX:+UseZGC\f[R]
   751 .\}
  3843 .RE
       
  3844 .RE
       
  3845 .SH DEPRECATED JAVA OPTIONS
       
  3846 .PP
       
  3847 These \f[CB]java\f[R] options are deprecated and might be removed in a
       
  3848 future JDK release.
       
  3849 They\[aq]re still accepted and acted upon, but a warning is issued when
       
  3850 they\[aq]re used.
       
  3851 .TP
       
  3852 .B \f[CB]\-Xfuture\f[R]
       
  3853 Enables strict class\-file format checks that enforce close conformance
       
  3854 to the class\-file format specification.
       
  3855 Developers should use this flag when developing new code.
       
  3856 Stricter checks may become the default in future releases.
       
  3857 .RS
       
  3858 .RE
       
  3859 .TP
       
  3860 .B \f[CB]\-Xloggc:\f[R]\f[I]filename\f[R]
       
  3861 Sets the file to which verbose GC events information should be
       
  3862 redirected for logging.
       
  3863 The \f[CB]\-Xloggc\f[R] option overrides \f[CB]\-verbose:gc\f[R] if both are
       
  3864 given with the same java command.
       
  3865 \f[CB]\-Xloggc:\f[R]\f[I]filename\f[R] is replaced by
       
  3866 \f[CB]\-Xlog:gc:\f[R]\f[I]filename\f[R].
       
  3867 See Enable Logging with the JVM Unified Logging Framework.
       
  3868 .RS
       
  3869 .PP
       
  3870 Example:
       
  3871 .PP
       
  3872 \f[CB]\-Xlog:gc:garbage\-collection.log\f[R]
       
  3873 .RE
       
  3874 .TP
       
  3875 .B \f[CB]\-XX:+FailOverToOldVerifier\f[R]
       
  3876 Enables automatic failover to the old verifier when the new type checker
       
  3877 fails.
       
  3878 By default, this option is disabled and it\[aq]s ignored (that is,
       
  3879 treated as disabled) for classes with a recent bytecode version.
       
  3880 You can enable it only for classes with older versions of the bytecode.
       
  3881 .RS
       
  3882 .RE
       
  3883 .TP
       
  3884 .B \f[CB]\-XX:+FlightRecorder\f[R]
       
  3885 Enables the use of Java Flight Recorder (JFR) during the runtime of the
       
  3886 application.
       
  3887 Since JDK 8u40 this option has not been required to use JFR.
       
  3888 .RS
       
  3889 .RE
       
  3890 .TP
       
  3891 .B \f[CB]\-XX:InitialRAMFraction=\f[R]\f[I]ratio\f[R]
       
  3892 Sets the initial amount of memory that the JVM may use for the Java heap
       
  3893 before applying ergonomics heuristics as a ratio of the maximum amount
       
  3894 determined as described in the \f[CB]\-XX:MaxRAM\f[R] option.
       
  3895 The default value is 64.
       
  3896 .RS
       
  3897 .PP
       
  3898 Use the option \f[CB]\-XX:InitialRAMPercentage\f[R] instead.
       
  3899 .RE
       
  3900 .TP
       
  3901 .B \f[CB]\-XX:MaxRAMFraction=\f[R]\f[I]ratio\f[R]
       
  3902 Sets the maximum amount of memory that the JVM may use for the Java heap
       
  3903 before applying ergonomics heuristics as a fraction of the maximum
       
  3904 amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option.
       
  3905 The default value is 4.
       
  3906 .RS
       
  3907 .PP
       
  3908 Specifying this option disables automatic use of compressed oops if the
       
  3909 combined result of this and other options influencing the maximum amount
       
  3910 of memory is larger than the range of memory addressable by compressed
       
  3911 oops.
       
  3912 See \f[CB]\-XX:UseCompressedOops\f[R] for further information about
       
  3913 compressed oops.
       
  3914 .PP
       
  3915 Use the option \f[CB]\-XX:MaxRAMPercentage\f[R] instead.
       
  3916 .RE
       
  3917 .TP
       
  3918 .B \f[CB]\-XX:MinRAMFraction=\f[R]\f[I]ratio\f[R]
       
  3919 Sets the maximum amount of memory that the JVM may use for the Java heap
       
  3920 before applying ergonomics heuristics as a fraction of the maximum
       
  3921 amount determined as described in the \f[CB]\-XX:MaxRAM\f[R] option for
       
  3922 small heaps.
       
  3923 A small heap is a heap of approximately 125 MB.
       
  3924 The default value is 2.
       
  3925 .RS
       
  3926 .PP
       
  3927 Use the option \f[CB]\-XX:MinRAMPercentage\f[R] instead.
       
  3928 .RE
       
  3929 .TP
       
  3930 .B \f[CB]\-XX:+TraceClassLoading\f[R]
       
  3931 Enables tracing of classes as they are loaded.
       
  3932 By default, this option is disabled and classes aren\[aq]t traced.
       
  3933 .RS
       
  3934 .PP
       
  3935 The replacement Unified Logging syntax is
       
  3936 \f[CB]\-Xlog:class+load=\f[R]\f[I]level\f[R].
       
  3937 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R]
       
  3938 .PP
       
  3939 Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or
       
  3940 \f[I]level\f[R]=\f[CB]debug\f[R] for additional information.
       
  3941 In Unified Logging syntax, \f[CB]\-verbose:class\f[R] equals
       
  3942 \f[CB]\-Xlog:class+load=info,class+unload=info\f[R].
       
  3943 .RE
       
  3944 .TP
       
  3945 .B \f[CB]\-XX:+TraceClassLoadingPreorder\f[R]
       
  3946 Enables tracing of all loaded classes in the order in which they\[aq]re
       
  3947 referenced.
       
  3948 By default, this option is disabled and classes aren\[aq]t traced.
       
  3949 .RS
       
  3950 .PP
       
  3951 The replacement Unified Logging syntax is
       
  3952 \f[CB]\-Xlog:class+preorder=debug\f[R].
       
  3953 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
       
  3954 .RE
       
  3955 .TP
       
  3956 .B \f[CB]\-XX:+TraceClassResolution\f[R]
       
  3957 Enables tracing of constant pool resolutions.
       
  3958 By default, this option is disabled and constant pool resolutions
       
  3959 aren\[aq]t traced.
       
  3960 .RS
       
  3961 .PP
       
  3962 The replacement Unified Logging syntax is
       
  3963 \f[CB]\-Xlog:class+resolve=debug\f[R].
       
  3964 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
       
  3965 .RE
       
  3966 .TP
       
  3967 .B \f[CB]\-XX:+TraceLoaderConstraints\f[R]
       
  3968 Enables tracing of the loader constraints recording.
       
  3969 By default, this option is disabled and loader constraints recording
       
  3970 isn\[aq]t traced.
       
  3971 .RS
       
  3972 .PP
       
  3973 The replacement Unified Logging syntax is
       
  3974 \f[CB]\-Xlog:class+loader+constraints=info\f[R].
       
  3975 See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
       
  3976 .RE
       
  3977 .TP
       
  3978 .B \f[CB]\-XX:+UseConcMarkSweepGC\f[R]
       
  3979 Enables the use of the CMS garbage collector for the old generation.
       
  3980 CMS is an alternative to the default garbage collector (G1), which also
       
  3981 focuses on meeting application latency requirements.
       
  3982 By default, this option is disabled and the collector is selected
       
  3983 automatically based on the configuration of the machine and type of the
       
  3984 JVM.
       
  3985 The CMS garbage collector is deprecated.
       
  3986 .RS
       
  3987 .RE
       
  3988 .SH OBSOLETE JAVA OPTIONS
       
  3989 .PP
       
  3990 These \f[CB]java\f[R] options are still accepted but ignored, and a
       
  3991 warning is issued when they\[aq]re used.
       
  3992 .TP
       
  3993 .B \f[CB]\-XX:+UseMembar\f[R]
       
  3994 Enabled issuing membars on thread\-state transitions.
       
  3995 This option was disabled by default on all platforms except ARM servers,
       
  3996 where it was enabled.
       
  3997 .RS
       
  3998 .RE
       
  3999 .TP
       
  4000 .B \f[CB]\-XX:MaxPermSize=\f[R]\f[I]size\f[R]
       
  4001 Sets the maximum permanent generation space size (in bytes).
       
  4002 This option was deprecated in JDK 8 and superseded by the
       
  4003 \f[CB]\-XX:MaxMetaspaceSize\f[R] option.
       
  4004 .RS
       
  4005 .RE
       
  4006 .TP
       
  4007 .B \f[CB]\-XX:PermSize=\f[R]\f[I]size\f[R]
       
  4008 Sets the space (in bytes) allocated to the permanent generation that
       
  4009 triggers a garbage collection if it\[aq]s exceeded.
       
  4010 This option was deprecated in JDK 8 and superseded by the
       
  4011 \f[CB]\-XX:MetaspaceSize\f[R] option.
       
  4012 .RS
       
  4013 .RE
       
  4014 .SH REMOVED JAVA OPTIONS
       
  4015 .PP
       
  4016 These \f[CB]java\f[R] options have been removed in JDK 13 and using them
       
  4017 results in an error of:
       
  4018 .RS
       
  4019 .PP
       
  4020 \f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
       
  4021 .RE
       
  4022 .TP
       
  4023 .B \f[CB]\-XX:+AggressiveOpts\f[R]
       
  4024 Enabled the use of aggressive performance optimization features.
       
  4025 By default, this option was disabled and experimental performance
       
  4026 features were not used.
       
  4027 .RS
       
  4028 .RE
       
  4029 .PP
       
  4030 For the lists and descriptions of options removed in previous releases
       
  4031 see the \f[I]Removed Java Options\f[R] section in:
       
  4032 .IP \[bu] 2
       
  4033 \f[B]Java Platform, Standard Edition Tools Reference, Release 12\f[R]
       
  4034 [https://docs.oracle.com/en/java/javase/12/tools/java.html#GUID\-3B1CE181\-CD30\-4178\-9602\-230B800D4FAE]
       
  4035 .IP \[bu] 2
       
  4036 \f[B]Java Platform, Standard Edition Tools Reference, Release 11\f[R]
       
  4037 [https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID\-741FC470\-AA3E\-494A\-8D2B\-1B1FE4A990D1]
       
  4038 .IP \[bu] 2
       
  4039 \f[B]Java Platform, Standard Edition Tools Reference, Release 10\f[R]
       
  4040 [https://docs.oracle.com/javase/10/tools/java.htm#JSWOR624]
       
  4041 .IP \[bu] 2
       
  4042 \f[B]Java Platform, Standard Edition Tools Reference, Release 9\f[R]
       
  4043 [https://docs.oracle.com/javase/9/tools/java.htm#JSWOR624]
       
  4044 .IP \[bu] 2
       
  4045 \f[B]Java Platform, Standard Edition Tools Reference, Release 8 for
       
  4046 Oracle JDK on Windows\f[R]
       
  4047 [https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BGBCIEFC]
       
  4048 .IP \[bu] 2
       
  4049 \f[B]Java Platform, Standard Edition Tools Reference, Release 8 for
       
  4050 Oracle JDK on Solaris, Linux, and macOS\f[R]
       
  4051 [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BGBCIEFC]
       
  4052 .SH JAVA COMMAND\-LINE ARGUMENT FILES
       
  4053 .PP
       
  4054 You can shorten or simplify the \f[CB]java\f[R] command by using
       
  4055 \f[CB]\@\f[R] argument files to specify one or more text files that
       
  4056 contain arguments, such as options and class names, which are passed to
       
  4057 the \f[CB]java\f[R] command.
       
  4058 This let\[aq]s you to create \f[CB]java\f[R] commands of any length on any
       
  4059 operating system.
       
  4060 .PP
       
  4061 In the command line, use the at sign (\f[CB]\@\f[R]) prefix to identify an
       
  4062 argument file that contains \f[CB]java\f[R] options and class names.
       
  4063 When the \f[CB]java\f[R] command encounters a file beginning with the at
       
  4064 sign (\f[CB]\@\f[R]), it expands the contents of that file into an
       
  4065 argument list just as they would be specified on the command line.
       
  4066 .PP
       
  4067 The \f[CB]java\f[R] launcher expands the argument file contents until it
       
  4068 encounters the \f[CB]\-\-disable\-\@files\f[R] option.
       
  4069 You can use the \f[CB]\-\-disable\-\@files\f[R] option anywhere on the
       
  4070 command line, including in an argument file, to stop \f[CB]\@\f[R]
       
  4071 argument files expansion.
       
  4072 .PP
       
  4073 The following items describe the syntax of \f[CB]java\f[R] argument files:
       
  4074 .IP \[bu] 2
       
  4075 The argument file must contain only ASCII characters or characters in
       
  4076 system default encoding that\[aq]s ASCII friendly, such as UTF\-8.
       
  4077 .IP \[bu] 2
       
  4078 The argument file size must not exceed MAXINT (2,147,483,647) bytes.
       
  4079 .IP \[bu] 2
       
  4080 The launcher doesn\[aq]t expand wildcards that are present within an
       
  4081 argument file.
       
  4082 .IP \[bu] 2
       
  4083 Use white space or new line characters to separate arguments included in
       
  4084 the file.
       
  4085 .IP \[bu] 2
       
  4086 White space includes a white space character, \f[CB]\\t\f[R],
       
  4087 \f[CB]\\n\f[R], \f[CB]\\r\f[R], and \f[CB]\\f\f[R].
       
  4088 .RS 2
       
  4089 .PP
       
  4090 For example, it is possible to have a path with a space, such as
       
  4091 \f[CB]c:\\Program\ Files\f[R] that can be specified as either
       
  4092 \f[CB]"c:\\\\Program\ Files"\f[R] or, to avoid an escape,
       
  4093 \f[CB]c:\\Program"\ "Files\f[R].
       
  4094 .RE
       
  4095 .IP \[bu] 2
       
  4096 Any option that contains spaces, such as a path component, must be
       
  4097 within quotation marks using quotation (\[aq]"\[aq]) characters in its
       
  4098 entirety.
       
  4099 .IP \[bu] 2
       
  4100 A string within quotation marks may contain the characters \f[CB]\\n\f[R],
       
  4101 \f[CB]\\r\f[R], \f[CB]\\t\f[R], and \f[CB]\\f\f[R].
       
  4102 They are converted to their respective ASCII codes.
       
  4103 \ 
       
  4104 .IP \[bu] 2
       
  4105 If a file name contains embedded spaces, then put the whole file name in
       
  4106 double quotation marks.
       
  4107 .IP \[bu] 2
       
  4108 File names in an argument file are relative to the current directory,
       
  4109 not to the location of the argument file.
       
  4110 .IP \[bu] 2
       
  4111 Use the number sign \f[CB]#\f[R] in the argument file to identify
       
  4112 comments.
       
  4113 All characters following the \f[CB]#\f[R] are ignored until the end of
       
  4114 line.
       
  4115 .IP \[bu] 2
       
  4116 Additional at sign \f[CB]\@\f[R] prefixes to \f[CB]\@\f[R] prefixed options
       
  4117 act as an escape, (the first \f[CB]\@\f[R] is removed and the rest of the
       
  4118 arguments are presented to the launcher literally).
       
  4119 .IP \[bu] 2
       
  4120 Lines may be continued using the continuation character (\f[CB]\\\f[R]) at
       
  4121 the end\-of\-line.
       
  4122 The two lines are concatenated with the leading white spaces trimmed.
       
  4123 To prevent trimming the \ leading white spaces, a continuation character
       
  4124 (\f[CB]\\\f[R]) may be placed at the first column.
       
  4125 .IP \[bu] 2
       
  4126 Because backslash (\\) is an escape character, a backslash
       
  4127 character\ must be escaped with another backslash character.
       
  4128 .IP \[bu] 2
       
  4129 Partial quote is allowed and is closed by an end\-of\-file.
       
  4130 .IP \[bu] 2
       
  4131 An open quote stops at end\-of\-line unless \f[CB]\\\f[R] is the last
       
  4132 character, which then joins the next line by removing all leading white
       
  4133 space characters.
       
  4134 .IP \[bu] 2
       
  4135 Wildcards (*) aren\[aq]t allowed in these lists (such as specifying
       
  4136 \f[CB]*.java\f[R]).
       
  4137 .IP \[bu] 2
       
  4138 Use of the at sign (\f[CB]\@\f[R]) to recursively interpret files
       
  4139 isn\[aq]t supported.
       
  4140 .SS Example of Open or Partial Quotes in an Argument File
       
  4141 .PP
       
  4142 In the argument file,
       
  4143 .IP
   752 .nf
  4144 .nf
   753 \fB\-Xloggc:garbage\-collection\&.log\fR
  4145 \f[CB]
   754  
  4146 \-cp\ "lib/
       
  4147 cool/
       
  4148 app/
       
  4149 jars
       
  4150 \f[R]
   755 .fi
  4151 .fi
   756 .if n \{\
  4152 .PP
   757 .RE
  4153 this is interpreted as:
   758 .\}
  4154 .RS
   759 .RE
  4155 .PP
   760 .PP
  4156 \f[CB]\-cp\ lib/cool/app/jars\f[R]
   761 \-Xmaxjitcodesize=\fIsize\fR
  4157 .RE
   762 .RS 4
  4158 .SS Example of a Backslash Character\ Escaped with Another Backslash
   763 Specifies the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
  4159 Character in an Argument File
   764 \fBk\fR
  4160 .PP
   765 or
  4161 To output the following:
   766 \fBK\fR
  4162 .RS
   767 to indicate kilobytes,
  4163 .PP
   768 \fBm\fR
  4164 \f[CB]\-cp\ c:\\Program\ Files\ (x86)\\Java\\jre\\lib\\ext;c:\\Program\ Files\\Java\\jre9\\lib\\ext\f[R]
   769 or
  4165 .RE
   770 \fBM\fR
  4166 .PP
   771 to indicate megabytes,
  4167 The backslash character must be specified in the argument file as:
   772 \fBg\fR
  4168 .RS
   773 or
  4169 .PP
   774 \fBG\fR
  4170 \f[CB]\-cp\ \ "c:\\\\Program\ Files\ (x86)\\\\Java\\\\jre\\\\lib\\\\ext;c:\\\\Program\ Files\\\\Java\\\\jre9\\\\lib\\\\ext"\f[R]
   775 to indicate gigabytes\&. The default maximum code cache size is 240 MB; if you disable tiered compilation with the option
  4171 .RE
   776 \fB\-XX:\-TieredCompilation\fR, then the default size is 48 MB:
  4172 .SS Example of an EOL Escape Used to Force Concatenation of Lines in an
   777 .sp
  4173 Argument File
   778 .if n \{\
  4174 .PP
   779 .RS 4
  4175 In the argument file,
   780 .\}
  4176 .IP
   781 .nf
  4177 .nf
   782 \fB\-Xmaxjitcodesize=240m\fR
  4178 \f[CB]
   783  
  4179 \-cp\ "/lib/cool\ app/jars:\\
       
  4180 \ \ \ \ /lib/another\ app/jars"
       
  4181 \f[R]
   784 .fi
  4182 .fi
   785 .if n \{\
  4183 .PP
   786 .RE
  4184 This is interpreted as:
   787 .\}
  4185 .RS
   788 This option is equivalent to
  4186 .PP
   789 \fB\-XX:ReservedCodeCacheSize\fR\&.
  4187 \f[CB]\-cp\ /lib/cool\ app/jars:/lib/another\ app/jars\f[R]
   790 .RE
  4188 .RE
   791 .PP
  4189 .SS Example of Line Continuation with Leading Spaces in an Argument File
   792 \-Xmixed
  4190 .PP
   793 .RS 4
  4191 In the argument file,
   794 Executes all bytecode by the interpreter except for hot methods, which are compiled to native code\&.
  4192 .IP
   795 .RE
       
   796 .PP
       
   797 \-Xmn\fIsize\fR
       
   798 .RS 4
       
   799 Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
       
   800 \fBk\fR
       
   801 or
       
   802 \fBK\fR
       
   803 to indicate kilobytes,
       
   804 \fBm\fR
       
   805 or
       
   806 \fBM\fR
       
   807 to indicate megabytes,
       
   808 \fBg\fR
       
   809 or
       
   810 \fBG\fR
       
   811 to indicate gigabytes\&.
       
   812 .sp
       
   813 The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too small, then a lot of minor garbage collections will be performed\&. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
       
   814 .sp
       
   815 The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:
       
   816 .sp
       
   817 .if n \{\
       
   818 .RS 4
       
   819 .\}
       
   820 .nf
  4193 .nf
   821 \fB\-Xmn256m\fR
  4194 \f[CB]
   822 \fB\-Xmn262144k\fR
  4195 \-cp\ "/lib/cool\\
   823 \fB\-Xmn268435456\fR
  4196 \\app/jars”
   824  
  4197 \f[R]
   825 .fi
  4198 .fi
   826 .if n \{\
  4199 .PP
   827 .RE
  4200 This is interpreted as:
   828 .\}
  4201 .PP
   829 Instead of the
  4202 \f[CB]\-cp\ /lib/cool\ app/jars\f[R]
   830 \fB\-Xmn\fR
  4203 .SS Examples of Using Single Argument File
   831 option to set both the initial and maximum size of the heap for the young generation, you can use
  4204 .PP
   832 \fB\-XX:NewSize\fR
  4205 You can use a single argument file, such as \f[CB]myargumentfile\f[R] in
   833 to set the initial size and
  4206 the following example, to hold all required \f[CB]java\f[R] arguments:
   834 \fB\-XX:MaxNewSize\fR
  4207 .RS
   835 to set the maximum size\&.
  4208 .PP
   836 .RE
  4209 \f[CB]java\ \@myargumentfile\f[R]
   837 .PP
  4210 .RE
   838 \-Xms\fIsize\fR
  4211 .SS Examples of Using Argument Files with Paths
   839 .RS 4
  4212 .PP
   840 Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter
  4213 You can include relative paths in argument files; however, they\[aq]re
   841 \fBk\fR
  4214 relative to the current working directory and not to the paths of the
   842 or
  4215 argument files themselves.
   843 \fBK\fR
  4216 In the following example, \f[CB]path1/options\f[R] and
   844 to indicate kilobytes,
  4217 \f[CB]path2/options\f[R] represent argument files with different paths.
   845 \fBm\fR
  4218 Any relative paths that they contain are relative to the current working
   846 or
  4219 directory and not to the argument files:
   847 \fBM\fR
  4220 .RS
   848 to indicate megabytes,
  4221 .PP
   849 \fBg\fR
  4222 \f[CB]java\ \@path1/options\ \@path2/classes\f[R]
   850 or
  4223 .RE
   851 \fBG\fR
  4224 .SH CODE HEAP STATE ANALYTICS
   852 to indicate gigabytes\&.
  4225 .SS Overview
   853 .sp
  4226 .PP
   854 The following examples show how to set the size of allocated memory to 6 MB using various units:
  4227 There are occasions when having insight into the current state of the
   855 .sp
  4228 JVM code heap would be helpful to answer questions such as:
   856 .if n \{\
  4229 .IP \[bu] 2
   857 .RS 4
  4230 Why was the JIT turned off and then on again and again?
   858 .\}
  4231 .IP \[bu] 2
       
  4232 Where has all the code heap space gone?
       
  4233 .IP \[bu] 2
       
  4234 Why is the method sweeper not working effectively?
       
  4235 .PP
       
  4236 To provide this insight, a code heap state analytics feature has been
       
  4237 implemented that enables on\-the\-fly analysis of the code heap.
       
  4238 The analytics process is divided into two parts.
       
  4239 The first part examines the entire code heap and aggregates all
       
  4240 information that is believed to be useful or important.
       
  4241 The second part consists of several independent steps that print the
       
  4242 collected information with an emphasis on different aspects of the data.
       
  4243 Data collection and printing are done on an "on request" basis.
       
  4244 .SS Syntax
       
  4245 .PP
       
  4246 Requests for real\-time, on\-the\-fly analysis can be issued with the
       
  4247 following command:
       
  4248 .RS
       
  4249 .PP
       
  4250 \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]Compiler.CodeHeap_Analytics\f[R]
       
  4251 [\f[I]function\f[R]] [\f[I]granularity\f[R]]
       
  4252 .RE
       
  4253 .PP
       
  4254 If you are only interested in how the code heap looks like after running
       
  4255 a sample workload, you can use the command line option:
       
  4256 .RS
       
  4257 .PP
       
  4258 \f[CB]\-Xlog:codecache=Trace\f[R]
       
  4259 .RE
       
  4260 .PP
       
  4261 To see the code heap state when a "CodeCache full" condition exists,
       
  4262 start the VM with the command line option:
       
  4263 .RS
       
  4264 .PP
       
  4265 \f[CB]\-Xlog:codecache=Debug\f[R]
       
  4266 .RE
       
  4267 .PP
       
  4268 See \f[B]CodeHeap State Analytics (OpenJDK)\f[R]
       
  4269 [https://bugs.openjdk.java.net/secure/attachment/75649/JVM_CodeHeap_StateAnalytics_V2.pdf]
       
  4270 for a detailed description of the code heap state analytics feature, the
       
  4271 supported functions, and the granularity options.
       
  4272 .SH ENABLE LOGGING WITH THE JVM UNIFIED LOGGING FRAMEWORK
       
  4273 .PP
       
  4274 You use the \f[CB]\-Xlog\f[R] option to configure or enable logging with
       
  4275 the Java Virtual Machine (JVM) unified logging framework.
       
  4276 .SS Synopsis
       
  4277 .RS
       
  4278 .PP
       
  4279 \f[CB]\-Xlog\f[R][\f[CB]:\f[R][\f[I]what\f[R]][\f[CB]:\f[R][\f[I]output\f[R]][\f[CB]:\f[R][\f[I]decorators\f[R]][\f[CB]:\f[R]\f[I]output\-options\f[R][\f[CB],\f[R]...]]]]]
       
  4280 .RE
       
  4281 .TP
       
  4282 .B \f[I]what\f[R]
       
  4283 Specifies a combination of tags and levels of the form
       
  4284 \f[I]tag1\f[R][\f[CB]+\f[R]\f[I]tag2\f[R]...][\f[CB]*\f[R]][\f[CB]=\f[R]\f[I]level\f[R]][\f[CB],\f[R]...].
       
  4285 Unless the wildcard (\f[CB]*\f[R]) is specified, only log messages tagged
       
  4286 with exactly the tags specified are matched.
       
  4287 See \f[B]\-Xlog Tags and Levels\f[R].
       
  4288 .RS
       
  4289 .RE
       
  4290 .TP
       
  4291 .B \f[I]output\f[R]
       
  4292 Sets the type of output.
       
  4293 Omitting the \f[I]output\f[R] type defaults to \f[CB]stdout\f[R].
       
  4294 See \f[B]\-Xlog Output\f[R].
       
  4295 .RS
       
  4296 .RE
       
  4297 .TP
       
  4298 .B \f[I]decorators\f[R]
       
  4299 Configures the output to use a custom set of decorators.
       
  4300 Omitting \f[I]decorators\f[R] defaults to \f[CB]uptime\f[R],
       
  4301 \f[CB]level\f[R], and \f[CB]tags\f[R].
       
  4302 See \f[B]Decorations\f[R].
       
  4303 .RS
       
  4304 .RE
       
  4305 .TP
       
  4306 .B \f[I]output\-options\f[R]
       
  4307 Sets the \f[CB]\-Xlog\f[R] logging output options.
       
  4308 .RS
       
  4309 .RE
       
  4310 .SS Description
       
  4311 .PP
       
  4312 The Java Virtual Machine (JVM) unified logging framework provides a
       
  4313 common logging system for all components of the JVM.
       
  4314 GC logging for the JVM has been changed to use the new logging
       
  4315 framework.
       
  4316 The mapping of old GC flags to the corresponding new Xlog configuration
       
  4317 is described in \f[B]Convert GC Logging Flags to Xlog\f[R].
       
  4318 In addition, runtime logging has also been changed to use the JVM
       
  4319 unified logging framework.
       
  4320 The mapping of legacy runtime logging flags to the corresponding new
       
  4321 Xlog configuration is described in \f[B]Convert Runtime Logging Flags to
       
  4322 Xlog\f[R].
       
  4323 .PP
       
  4324 The following provides quick reference to the \f[CB]\-Xlog\f[R] command
       
  4325 and syntax for options:
       
  4326 .TP
       
  4327 .B \f[CB]\-Xlog\f[R]
       
  4328 Enables JVM logging on an \f[CB]info\f[R] level.
       
  4329 .RS
       
  4330 .RE
       
  4331 .TP
       
  4332 .B \f[CB]\-Xlog:help\f[R]
       
  4333 Prints \f[CB]\-Xlog\f[R] usage syntax and available tags, levels, and
       
  4334 decorators along with example command lines with explanations.
       
  4335 .RS
       
  4336 .RE
       
  4337 .TP
       
  4338 .B \f[CB]\-Xlog:disable\f[R]
       
  4339 Turns off all logging and clears all configuration of the logging
       
  4340 framework including the default configuration for warnings and errors.
       
  4341 .RS
       
  4342 .RE
       
  4343 .TP
       
  4344 .B \f[CB]\-Xlog\f[R][\f[CB]:\f[R]\f[I]option\f[R]]
       
  4345 Applies multiple arguments in the order that they appear on the command
       
  4346 line.
       
  4347 Multiple \f[CB]\-Xlog\f[R] arguments for the same output override each
       
  4348 other in their given order.
       
  4349 .RS
       
  4350 .PP
       
  4351 The \f[I]option\f[R] is set as:
       
  4352 .RS
       
  4353 .PP
       
  4354 [\f[I]tag\-selection\f[R]][\f[CB]:\f[R][\f[I]output\f[R]][\f[CB]:\f[R][\f[I]decorators\f[R]][\f[CB]:\f[R]\f[I]output\-options\f[R]]]]
       
  4355 .RE
       
  4356 .PP
       
  4357 Omitting the \f[I]tag\-selection\f[R] defaults to a tag\-set of
       
  4358 \f[CB]all\f[R] and a level of \f[CB]info\f[R].
       
  4359 .RS
       
  4360 .PP
       
  4361 \f[I]tag\f[R][\f[CB]+\f[R]...] \f[CB]all\f[R]
       
  4362 .RE
       
  4363 .PP
       
  4364 The \f[CB]all\f[R] tag is a meta tag consisting of all tag\-sets
       
  4365 available.
       
  4366 The asterisk \f[CB]*\f[R] in a tag set definition denotes a wildcard tag
       
  4367 match.
       
  4368 Matching with a wildcard selects all tag sets that contain \f[I]at
       
  4369 least\f[R] the specified tags.
       
  4370 Without the wildcard, only exact matches of the specified tag sets are
       
  4371 selected.
       
  4372 .PP
       
  4373 \f[I]output\-options\f[R] is
       
  4374 .RS
       
  4375 .PP
       
  4376 \f[CB]filecount=\f[R]\f[I]file\-count\f[R] \f[CB]filesize=\f[R]\f[I]file size
       
  4377 with optional K, M or G suffix\f[R]
       
  4378 .RE
       
  4379 .RE
       
  4380 .SS Default Configuration
       
  4381 .PP
       
  4382 When the \f[CB]\-Xlog\f[R] option and nothing else is specified on the
       
  4383 command line, the default configuration is used.
       
  4384 The default configuration logs all messages with a level that matches
       
  4385 either warning or error regardless of what tags the message is
       
  4386 associated with.
       
  4387 The default configuration is equivalent to entering the following on the
       
  4388 command line:
       
  4389 .RS
       
  4390 .PP
       
  4391 \f[CB]\-Xlog:all=warning:stdout:uptime,level,tags\f[R]
       
  4392 .RE
       
  4393 .SS Controlling Logging at Runtime
       
  4394 .PP
       
  4395 Logging can also be controlled at run time through Diagnostic Commands
       
  4396 (with the \f[B]jcmd\f[R] utility).
       
  4397 Everything that can be specified on the command line can also be
       
  4398 specified dynamically with the \f[CB]VM.log\f[R] command.
       
  4399 As the diagnostic commands are automatically exposed as MBeans, you can
       
  4400 use JMX to change logging configuration at run time.
       
  4401 .SS \-Xlog Tags and Levels
       
  4402 .PP
       
  4403 Each log message has a level and a tag set associated with it.
       
  4404 The level of the message corresponds to its details, and the tag set
       
  4405 corresponds to what the message contains or which JVM component it
       
  4406 involves (such as, \f[CB]gc\f[R], \f[CB]jit\f[R], or \f[CB]os\f[R]).
       
  4407 Mapping GC flags to the Xlog configuration is described in \f[B]Convert
       
  4408 GC Logging Flags to Xlog\f[R].
       
  4409 Mapping legacy runtime logging flags to the corresponding Xlog
       
  4410 configuration is described in \f[B]Convert Runtime Logging Flags to
       
  4411 Xlog\f[R].
       
  4412 .PP
       
  4413 \f[B]Available log levels:\f[R]
       
  4414 .IP \[bu] 2
       
  4415 \f[CB]off\f[R]
       
  4416 .IP \[bu] 2
       
  4417 \f[CB]trace\f[R]
       
  4418 .IP \[bu] 2
       
  4419 \f[CB]debug\f[R]
       
  4420 .IP \[bu] 2
       
  4421 \f[CB]info\f[R]
       
  4422 .IP \[bu] 2
       
  4423 \f[CB]warning\f[R]
       
  4424 .IP \[bu] 2
       
  4425 \f[CB]error\f[R]
       
  4426 .PP
       
  4427 \f[B]Available log tags:\f[R]
       
  4428 .PP
       
  4429 There are literally dozens of log tags, which in the right combinations,
       
  4430 will enable a range of logging output.
       
  4431 The full set of available log tags can be seen using
       
  4432 \f[CB]\-Xlog:help\f[R].
       
  4433 Specifying \f[CB]all\f[R] instead of a tag combination matches all tag
       
  4434 combinations.
       
  4435 .SS \-Xlog Output
       
  4436 .PP
       
  4437 The \f[CB]\-Xlog\f[R] option supports the following types of outputs:
       
  4438 .IP \[bu] 2
       
  4439 \f[CB]stdout\f[R] \-\-\- Sends output to stdout
       
  4440 .IP \[bu] 2
       
  4441 \f[CB]stderr\f[R] \-\-\- Sends output to stderr
       
  4442 .IP \[bu] 2
       
  4443 \f[CB]file=\f[R]\f[I]filename\f[R] \-\-\- Sends output to text file(s).
       
  4444 .PP
       
  4445 When using \f[CB]file=\f[R]\f[I]filename\f[R], specifying \f[CB]%p\f[R]
       
  4446 and/or \f[CB]%t\f[R] in the file name expands to the JVM\[aq]s PID and
       
  4447 startup timestamp, respectively.
       
  4448 You can also configure text files to handle file rotation based on file
       
  4449 size and a number of files to rotate.
       
  4450 For example, to rotate the log file every 10 MB and keep 5 files in
       
  4451 rotation, specify the options \f[CB]filesize=10M,\ filecount=5\f[R].
       
  4452 The target size of the files isn\[aq]t guaranteed to be exact, it\[aq]s
       
  4453 just an approximate value.
       
  4454 Files are rotated by default with up to 5 rotated files of target size
       
  4455 20 MB, unless configured otherwise.
       
  4456 Specifying \f[CB]filecount=0\f[R] means that the log file shouldn\[aq]t be
       
  4457 rotated.
       
  4458 There\[aq]s a possibility of the pre\-existing log file getting
       
  4459 overwritten.
       
  4460 .SS Decorations
       
  4461 .PP
       
  4462 Logging messages are decorated with information about the message.
       
  4463 You can configure each output to use a custom set of decorators.
       
  4464 The order of the output is always the same as listed in the table.
       
  4465 You can configure the decorations to be used at run time.
       
  4466 Decorations are prepended to the log message.
       
  4467 For example:
       
  4468 .IP
   859 .nf
  4469 .nf
   860 \fB\-Xms6291456\fR
  4470 \f[CB]
   861 \fB\-Xms6144k\fR
  4471 [6.567s][info][gc,old]\ Old\ collection\ complete
   862 \fB\-Xms6m\fR
  4472 \f[R]
   863  
       
   864 .fi
  4473 .fi
   865 .if n \{\
  4474 .PP
   866 .RE
  4475 Omitting \f[CB]decorators\f[R] defaults to \f[CB]uptime\f[R],
   867 .\}
  4476 \f[CB]level\f[R], and \f[CB]tags\f[R].
   868 If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the
  4477 The \f[CB]none\f[R] decorator is special and is used to turn off all
   869 \fB\-Xmn\fR
  4478 decorations.
   870 option or the
  4479 .PP
   871 \fB\-XX:NewSize\fR
  4480 \f[CB]time\f[R] (\f[CB]t\f[R]), \f[CB]utctime\f[R] (\f[CB]utc\f[R]),
   872 option\&.
  4481 \f[CB]uptime\f[R] (\f[CB]u\f[R]), \f[CB]timemillis\f[R] (\f[CB]tm\f[R]),
   873 .RE
  4482 \f[CB]uptimemillis\f[R] (\f[CB]um\f[R]), \f[CB]timenanos\f[R] (\f[CB]tn\f[R]),
   874 .PP
  4483 \f[CB]uptimenanos\f[R] (\f[CB]un\f[R]), \f[CB]hostname\f[R] (\f[CB]hn\f[R]),
   875 \-Xmx\fIsize\fR
  4484 \f[CB]pid\f[R] (\f[CB]p\f[R]), \f[CB]tid\f[R] (\f[CB]ti\f[R]), \f[CB]level\f[R]
   876 .RS 4
  4485 (\f[CB]l\f[R]), \f[CB]tags\f[R] (\f[CB]tg\f[R]) decorators can also be
   877 Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
  4486 specified as \f[CB]none\f[R] for no decoration.
   878 \fBk\fR
  4487 .PP
   879 or
       
   880 \fBK\fR
       
   881 to indicate kilobytes,
       
   882 \fBm\fR
       
   883 or
       
   884 \fBM\fR
       
   885 to indicate megabytes,
       
   886 \fBg\fR
       
   887 or
       
   888 \fBG\fR
       
   889 to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
       
   890 \fB\-Xms\fR
       
   891 and
       
   892 \fB\-Xmx\fR
       
   893 are often set to the same value\&. See the section "Ergonomics" in
       
   894 \fIJava SE HotSpot Virtual Machine Garbage Collection Tuning Guide\fR
       
   895 at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gctuning/index\&.html\&.
       
   896 .sp
       
   897 The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
       
   898 .sp
       
   899 .if n \{\
       
   900 .RS 4
       
   901 .\}
       
   902 .nf
       
   903 \fB\-Xmx83886080\fR
       
   904 \fB\-Xmx81920k\fR
       
   905 \fB\-Xmx80m\fR
       
   906  
       
   907 .fi
       
   908 .if n \{\
       
   909 .RE
       
   910 .\}
       
   911 The
       
   912 \fB\-Xmx\fR
       
   913 option is equivalent to
       
   914 \fB\-XX:MaxHeapSize\fR\&.
       
   915 .RE
       
   916 .PP
       
   917 \-Xnoclassgc
       
   918 .RS 4
       
   919 Disables garbage collection (GC) of classes\&. This can save some GC time, which shortens interruptions during the application run\&.
       
   920 .sp
       
   921 When you specify
       
   922 \fB\-Xnoclassgc\fR
       
   923 at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
       
   924 .RE
       
   925 .PP
       
   926 \-Xprof
       
   927 .RS 4
       
   928 Profiles the running program and sends profiling data to standard output\&. This option is provided as a utility that is useful in program development and is not intended to be used in production systems\&.
       
   929 .RE
       
   930 .PP
       
   931 \-Xrs
       
   932 .RS 4
       
   933 Reduces the use of operating system signals by the JVM\&.
       
   934 .sp
       
   935 Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly\&.
       
   936 .sp
       
   937 The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses
       
   938 \fBSIGHUP\fR,
       
   939 \fBSIGINT\fR, and
       
   940 \fBSIGTERM\fR
       
   941 to initiate the running of shutdown hooks\&.
       
   942 .sp
       
   943 The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses
       
   944 \fBSIGQUIT\fR
       
   945 to perform thread dumps\&.
       
   946 .sp
       
   947 Applications embedding the JVM frequently need to trap signals such as
       
   948 \fBSIGINT\fR
       
   949 or
       
   950 \fBSIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The
       
   951 \fB\-Xrs\fR
       
   952 option is available to address this issue\&. When
       
   953 \fB\-Xrs\fR
       
   954 is used, the signal masks for
       
   955 \fBSIGINT\fR,
       
   956 \fBSIGTERM\fR,
       
   957 \fBSIGHUP\fR, and
       
   958 \fBSIGQUIT\fR
       
   959 are not changed by the JVM, and signal handlers for these signals are not installed\&.
       
   960 .sp
       
   961 There are two consequences of specifying
       
   962 \fB\-Xrs\fR:
       
   963 .sp
       
   964 .RS 4
       
   965 .ie n \{\
       
   966 \h'-04'\(bu\h'+03'\c
       
   967 .\}
       
   968 .el \{\
       
   969 .sp -1
       
   970 .IP \(bu 2.3
       
   971 .\}
       
   972 \fBSIGQUIT\fR
       
   973 thread dumps are not available\&.
       
   974 .RE
       
   975 .sp
       
   976 .RS 4
       
   977 .ie n \{\
       
   978 \h'-04'\(bu\h'+03'\c
       
   979 .\}
       
   980 .el \{\
       
   981 .sp -1
       
   982 .IP \(bu 2.3
       
   983 .\}
       
   984 User code is responsible for causing shutdown hooks to run, for example, by calling
       
   985 \fBSystem\&.exit()\fR
       
   986 when the JVM is to be terminated\&.
       
   987 .RE
       
   988 .RE
       
   989 .PP
       
   990 \-Xshare:\fImode\fR
       
   991 .RS 4
       
   992 Sets the class data sharing (CDS) mode\&. Possible
       
   993 \fImode\fR
       
   994 arguments for this option include the following:
       
   995 .PP
       
   996 auto
       
   997 .RS 4
       
   998 Use CDS if possible\&. This is the default value for Java HotSpot 32\-Bit Client VM\&.
       
   999 .RE
       
  1000 .PP
       
  1001 on
       
  1002 .RS 4
       
  1003 Require the use of CDS\&. Print an error message and exit if class data sharing cannot be used\&.
       
  1004 .RE
       
  1005 .PP
       
  1006 off
       
  1007 .RS 4
       
  1008 Do not use CDS\&. This is the default value for Java HotSpot 32\-Bit Server VM, Java HotSpot 64\-Bit Client VM, and Java HotSpot 64\-Bit Server VM\&.
       
  1009 .RE
       
  1010 .PP
       
  1011 dump
       
  1012 .RS 4
       
  1013 Manually generate the CDS archive\&. Specify the application class path as described in "Setting the Class Path "\&.
       
  1014 .sp
       
  1015 You should regenerate the CDS archive with each new JDK release\&.
       
  1016 .RE
       
  1017 .RE
       
  1018 .PP
       
  1019 \-XshowSettings:\fIcategory\fR
       
  1020 .RS 4
       
  1021 Shows settings and continues\&. Possible
       
  1022 \fIcategory\fR
       
  1023 arguments for this option include the following:
       
  1024 .PP
       
  1025 all
       
  1026 .RS 4
       
  1027 Shows all categories of settings\&. This is the default value\&.
       
  1028 .RE
       
  1029 .PP
       
  1030 locale
       
  1031 .RS 4
       
  1032 Shows settings related to locale\&.
       
  1033 .RE
       
  1034 .PP
       
  1035 properties
       
  1036 .RS 4
       
  1037 Shows settings related to system properties\&.
       
  1038 .RE
       
  1039 .PP
       
  1040 vm
       
  1041 .RS 4
       
  1042 Shows the settings of the JVM\&.
       
  1043 .RE
       
  1044 .RE
       
  1045 .PP
       
  1046 \-Xss\fIsize\fR
       
  1047 .RS 4
       
  1048 Sets the thread stack size (in bytes)\&. Append the letter
       
  1049 \fBk\fR
       
  1050 or
       
  1051 \fBK\fR
       
  1052 to indicate KB,
       
  1053 \fBm\fR
       
  1054 or
       
  1055 \fBM\fR
       
  1056 to indicate MB,
       
  1057 \fBg\fR
       
  1058 or
       
  1059 \fBG\fR
       
  1060 to indicate GB\&. The default value depends on the platform:
       
  1061 .sp
       
  1062 .RS 4
       
  1063 .ie n \{\
       
  1064 \h'-04'\(bu\h'+03'\c
       
  1065 .\}
       
  1066 .el \{\
       
  1067 .sp -1
       
  1068 .IP \(bu 2.3
       
  1069 .\}
       
  1070 Linux/ARM (32\-bit): 320 KB
       
  1071 .RE
       
  1072 .sp
       
  1073 .RS 4
       
  1074 .ie n \{\
       
  1075 \h'-04'\(bu\h'+03'\c
       
  1076 .\}
       
  1077 .el \{\
       
  1078 .sp -1
       
  1079 .IP \(bu 2.3
       
  1080 .\}
       
  1081 Linux/i386 (32\-bit): 320 KB
       
  1082 .RE
       
  1083 .sp
       
  1084 .RS 4
       
  1085 .ie n \{\
       
  1086 \h'-04'\(bu\h'+03'\c
       
  1087 .\}
       
  1088 .el \{\
       
  1089 .sp -1
       
  1090 .IP \(bu 2.3
       
  1091 .\}
       
  1092 Linux/x64 (64\-bit): 1024 KB
       
  1093 .RE
       
  1094 .sp
       
  1095 .RS 4
       
  1096 .ie n \{\
       
  1097 \h'-04'\(bu\h'+03'\c
       
  1098 .\}
       
  1099 .el \{\
       
  1100 .sp -1
       
  1101 .IP \(bu 2.3
       
  1102 .\}
       
  1103 OS X (64\-bit): 1024 KB
       
  1104 .RE
       
  1105 .sp
       
  1106 .RS 4
       
  1107 .ie n \{\
       
  1108 \h'-04'\(bu\h'+03'\c
       
  1109 .\}
       
  1110 .el \{\
       
  1111 .sp -1
       
  1112 .IP \(bu 2.3
       
  1113 .\}
       
  1114 Oracle Solaris/i386 (32\-bit): 320 KB
       
  1115 .RE
       
  1116 .sp
       
  1117 .RS 4
       
  1118 .ie n \{\
       
  1119 \h'-04'\(bu\h'+03'\c
       
  1120 .\}
       
  1121 .el \{\
       
  1122 .sp -1
       
  1123 .IP \(bu 2.3
       
  1124 .\}
       
  1125 Oracle Solaris/x64 (64\-bit): 1024 KB
       
  1126 .RE
       
  1127 .sp
       
  1128 The following examples set the thread stack size to 1024 KB in different units:
       
  1129 .sp
       
  1130 .if n \{\
       
  1131 .RS 4
       
  1132 .\}
       
  1133 .nf
       
  1134 \fB\-Xss1m\fR
       
  1135 \fB\-Xss1024k\fR
       
  1136 \fB\-Xss1048576\fR
       
  1137  
       
  1138 .fi
       
  1139 .if n \{\
       
  1140 .RE
       
  1141 .\}
       
  1142 This option is equivalent to
       
  1143 \fB\-XX:ThreadStackSize\fR\&.
       
  1144 .RE
       
  1145 .PP
       
  1146 \-Xusealtsigs
       
  1147 .RS 4
       
  1148 Use alternative signals instead of
       
  1149 \fBSIGUSR1\fR
       
  1150 and
       
  1151 \fBSIGUSR2\fR
       
  1152 for JVM internal signals\&. This option is equivalent to
       
  1153 \fB\-XX:+UseAltSigs\fR\&.
       
  1154 .RE
       
  1155 .PP
       
  1156 \-Xverify:\fImode\fR
       
  1157 .RS 4
       
  1158 Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible
       
  1159 \fImode\fR
       
  1160 arguments for this option include the following:
       
  1161 .PP
       
  1162 none
       
  1163 .RS 4
       
  1164 Do not verify the bytecode\&. This reduces startup time and also reduces the protection provided by Java\&.
       
  1165 .sp
       
  1166 This option is deprecated and may be removed in a future release.
       
  1167 .RE
       
  1168 .PP
       
  1169 remote
       
  1170 .RS 4
       
  1171 Verify those classes that are not loaded by the bootstrap class loader\&. This is the default behavior if you do not specify the
       
  1172 \fB\-Xverify\fR
       
  1173 option\&.
       
  1174 .RE
       
  1175 .PP
       
  1176 all
       
  1177 .RS 4
       
  1178 Verify all classes\&.
       
  1179 .RE
       
  1180 .RE
       
  1181 .SS "Advanced Runtime Options"
       
  1182 .PP
       
  1183 These options control the runtime behavior of the Java HotSpot VM\&.
       
  1184 .PP
       
  1185 \-XX:+DisableAttachMechanism
       
  1186 .RS 4
       
  1187 Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as
       
  1188 \fBjcmd\fR,
       
  1189 \fBjstack\fR,
       
  1190 \fBjmap\fR, and
       
  1191 \fBjinfo\fR\&.
       
  1192 .RE
       
  1193 .PP
       
  1194 \-XX:ErrorFile=\fIfilename\fR
       
  1195 .RS 4
       
  1196 Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named
       
  1197 \fBhs_err_pid\fR\fIpid\fR\fB\&.log\fR
       
  1198 where
       
  1199 \fIpid\fR
       
  1200 is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as
       
  1201 \fB%p\fR):
       
  1202 .sp
       
  1203 .if n \{\
       
  1204 .RS 4
       
  1205 .\}
       
  1206 .nf
       
  1207 \fB\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fR
       
  1208  
       
  1209 .fi
       
  1210 .if n \{\
       
  1211 .RE
       
  1212 .\}
       
  1213 The following example shows how to set the error log to
       
  1214 \fB/var/log/java/java_error\&.log\fR:
       
  1215 .sp
       
  1216 .if n \{\
       
  1217 .RS 4
       
  1218 .\}
       
  1219 .nf
       
  1220 \fB\-XX:ErrorFile=/var/log/java/java_error\&.log\fR
       
  1221  
       
  1222 .fi
       
  1223 .if n \{\
       
  1224 .RE
       
  1225 .\}
       
  1226 If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is
       
  1227 \fB/tmp\fR\&.
       
  1228 .RE
       
  1229 .PP
       
  1230 \-XX:+FailOverToOldVerifier
       
  1231 .RS 4
       
  1232 Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
       
  1233 .RE
       
  1234 .PP
       
  1235 \-XX:LargePageSizeInBytes=\fIsize\fR
       
  1236 .RS 4
       
  1237 On Solaris, sets the maximum size (in bytes) for large pages used for Java heap\&. The
       
  1238 \fIsize\fR
       
  1239 argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter
       
  1240 \fBk\fR
       
  1241 or
       
  1242 \fBK\fR
       
  1243 to indicate kilobytes,
       
  1244 \fBm\fR
       
  1245 or
       
  1246 \fBM\fR
       
  1247 to indicate megabytes,
       
  1248 \fBg\fR
       
  1249 or
       
  1250 \fBG\fR
       
  1251 to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
       
  1252 .sp
       
  1253 The following example illustrates how to set the large page size to 4 megabytes (MB):
       
  1254 .sp
       
  1255 .if n \{\
       
  1256 .RS 4
       
  1257 .\}
       
  1258 .nf
       
  1259 \fB\-XX:LargePageSizeInBytes=4m\fR
       
  1260  
       
  1261 .fi
       
  1262 .if n \{\
       
  1263 .RE
       
  1264 .\}
       
  1265 .RE
       
  1266 .PP
       
  1267 \-XX:MaxDirectMemorySize=\fIsize\fR
       
  1268 .RS 4
       
  1269 Sets the maximum total size (in bytes) of the New I/O (the
       
  1270 \fBjava\&.nio\fR
       
  1271 package) direct\-buffer allocations\&. Append the letter
       
  1272 \fBk\fR
       
  1273 or
       
  1274 \fBK\fR
       
  1275 to indicate kilobytes,
       
  1276 \fBm\fR
       
  1277 or
       
  1278 \fBM\fR
       
  1279 to indicate megabytes,
       
  1280 \fBg\fR
       
  1281 or
       
  1282 \fBG\fR
       
  1283 to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct\-buffer allocations automatically\&.
       
  1284 .sp
       
  1285 The following examples illustrate how to set the NIO size to 1024 KB in different units:
       
  1286 .sp
       
  1287 .if n \{\
       
  1288 .RS 4
       
  1289 .\}
       
  1290 .nf
       
  1291 \fB\-XX:MaxDirectMemorySize=1m\fR
       
  1292 \fB\-XX:MaxDirectMemorySize=1024k\fR
       
  1293 \fB\-XX:MaxDirectMemorySize=1048576\fR
       
  1294  
       
  1295 .fi
       
  1296 .if n \{\
       
  1297 .RE
       
  1298 .\}
       
  1299 .RE
       
  1300 .PP
       
  1301 \-XX:NativeMemoryTracking=\fImode\fR
       
  1302 .RS 4
       
  1303 Specifies the mode for tracking JVM native memory usage\&. Possible
       
  1304 \fImode\fR
       
  1305 arguments for this option include the following:
       
  1306 .PP
       
  1307 off
       
  1308 .RS 4
       
  1309 Do not track JVM native memory usage\&. This is the default behavior if you do not specify the
       
  1310 \fB\-XX:NativeMemoryTracking\fR
       
  1311 option\&.
       
  1312 .RE
       
  1313 .PP
       
  1314 summary
       
  1315 .RS 4
       
  1316 Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread\&.
       
  1317 .RE
       
  1318 .PP
       
  1319 detail
       
  1320 .RS 4
       
  1321 In addition to tracking memory usage by JVM subsystems, track memory usage by individual
       
  1322 \fBCallSite\fR, individual virtual memory region and its committed regions\&.
       
  1323 .RE
       
  1324 .RE
       
  1325 .PP
       
  1326 \-XX:ObjectAlignmentInBytes=\fIalignment\fR
       
  1327 .RS 4
       
  1328 Sets the memory alignment of Java objects (in bytes)\&. By default, the value is set to 8 bytes\&. The specified value should be a power of two, and must be within the range of 8 and 256 (inclusive)\&. This option makes it possible to use compressed pointers with large Java heap sizes\&.
       
  1329 .sp
       
  1330 The heap size limit in bytes is calculated as:
       
  1331 .sp
       
  1332 \fB4GB * ObjectAlignmentInBytes\fR
       
  1333 .sp
       
  1334 Note: As the alignment value increases, the unused space between objects will also increase\&. As a result, you may not realize any benefits from using compressed pointers with large Java heap sizes\&.
       
  1335 .RE
       
  1336 .PP
       
  1337 \-XX:OnError=\fIstring\fR
       
  1338 .RS 4
       
  1339 Sets a custom command or a series of semicolon\-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
       
  1340 .sp
       
  1341 The following example shows how the
       
  1342 \fB\-XX:OnError\fR
       
  1343 option can be used to run the
       
  1344 \fBgcore\fR
       
  1345 command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the
       
  1346 \fB%p\fR
       
  1347 designates the current process):
       
  1348 .sp
       
  1349 .if n \{\
       
  1350 .RS 4
       
  1351 .\}
       
  1352 .nf
       
  1353 \fB\-XX:OnError="gcore %p;dbx \- %p"\fR
       
  1354  
       
  1355 .fi
       
  1356 .if n \{\
       
  1357 .RE
       
  1358 .\}
       
  1359 .RE
       
  1360 .PP
       
  1361 \-XX:OnOutOfMemoryError=\fIstring\fR
       
  1362 .RS 4
       
  1363 Sets a custom command or a series of semicolon\-separated commands to run when an
       
  1364 \fBOutOfMemoryError\fR
       
  1365 exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the
       
  1366 \fB\-XX:OnError\fR
       
  1367 option\&.
       
  1368 .RE
       
  1369 .PP
       
  1370 \-XX:+PerfDataSaveToFile
       
  1371 .RS 4
       
  1372 If enabled, saves
       
  1373 jstat(1) binary data when the Java application exits\&. This binary data is saved in a file named
       
  1374 \fBhsperfdata_\fR\fI<pid>\fR, where
       
  1375 \fI<pid>\fR
       
  1376 is the process identifier of the Java application you ran\&. Use
       
  1377 \fBjstat\fR
       
  1378 to display the performance data contained in this file as follows:
       
  1379 .sp
       
  1380 .if n \{\
       
  1381 .RS 4
       
  1382 .\}
       
  1383 .nf
       
  1384 \fBjstat \-class file:///\fR\fB\fI<path>\fR\fR\fB/hsperfdata_\fR\fB\fI<pid>\fR\fR
       
  1385 \fBjstat \-gc file:///\fR\fB\fI<path>\fR\fR\fB/hsperfdata_\fR\fB\fI<pid>\fR\fR
       
  1386 .fi
       
  1387 .if n \{\
       
  1388 .RE
       
  1389 .\}
       
  1390 .RE
       
  1391 .PP
       
  1392 \-XX:+PrintCommandLineFlags
       
  1393 .RS 4
       
  1394 Enables printing of ergonomically selected JVM flags that appeared on the command line\&. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector\&. By default, this option is disabled and flags are not printed\&.
       
  1395 .RE
       
  1396 .PP
       
  1397 \-XX:+PrintNMTStatistics
       
  1398 .RS 4
       
  1399 Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see
       
  1400 \fB\-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
       
  1401 .RE
       
  1402 .PP
       
  1403 \-XX:+ShowMessageBoxOnError
       
  1404 .RS 4
       
  1405 Enables displaying of a dialog box when the JVM experiences an irrecoverable error\&. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error\&. By default, this option is disabled\&.
       
  1406 .RE
       
  1407 .PP
       
  1408 \-XX:ThreadStackSize=\fIsize\fR
       
  1409 .RS 4
       
  1410 Sets the thread stack size (in bytes)\&. Append the letter
       
  1411 \fBk\fR
       
  1412 or
       
  1413 \fBK\fR
       
  1414 to indicate kilobytes,
       
  1415 \fBm\fR
       
  1416 or
       
  1417 \fBM\fR
       
  1418 to indicate megabytes,
       
  1419 \fBg\fR
       
  1420 or
       
  1421 \fBG\fR
       
  1422 to indicate gigabytes\&. The default value depends on the platform:
       
  1423 .sp
       
  1424 .RS 4
       
  1425 .ie n \{\
       
  1426 \h'-04'\(bu\h'+03'\c
       
  1427 .\}
       
  1428 .el \{\
       
  1429 .sp -1
       
  1430 .IP \(bu 2.3
       
  1431 .\}
       
  1432 Linux/ARM (32\-bit): 320 KB
       
  1433 .RE
       
  1434 .sp
       
  1435 .RS 4
       
  1436 .ie n \{\
       
  1437 \h'-04'\(bu\h'+03'\c
       
  1438 .\}
       
  1439 .el \{\
       
  1440 .sp -1
       
  1441 .IP \(bu 2.3
       
  1442 .\}
       
  1443 Linux/i386 (32\-bit): 320 KB
       
  1444 .RE
       
  1445 .sp
       
  1446 .RS 4
       
  1447 .ie n \{\
       
  1448 \h'-04'\(bu\h'+03'\c
       
  1449 .\}
       
  1450 .el \{\
       
  1451 .sp -1
       
  1452 .IP \(bu 2.3
       
  1453 .\}
       
  1454 Linux/x64 (64\-bit): 1024 KB
       
  1455 .RE
       
  1456 .sp
       
  1457 .RS 4
       
  1458 .ie n \{\
       
  1459 \h'-04'\(bu\h'+03'\c
       
  1460 .\}
       
  1461 .el \{\
       
  1462 .sp -1
       
  1463 .IP \(bu 2.3
       
  1464 .\}
       
  1465 OS X (64\-bit): 1024 KB
       
  1466 .RE
       
  1467 .sp
       
  1468 .RS 4
       
  1469 .ie n \{\
       
  1470 \h'-04'\(bu\h'+03'\c
       
  1471 .\}
       
  1472 .el \{\
       
  1473 .sp -1
       
  1474 .IP \(bu 2.3
       
  1475 .\}
       
  1476 Oracle Solaris/i386 (32\-bit): 320 KB
       
  1477 .RE
       
  1478 .sp
       
  1479 .RS 4
       
  1480 .ie n \{\
       
  1481 \h'-04'\(bu\h'+03'\c
       
  1482 .\}
       
  1483 .el \{\
       
  1484 .sp -1
       
  1485 .IP \(bu 2.3
       
  1486 .\}
       
  1487 Oracle Solaris/x64 (64\-bit): 1024 KB
       
  1488 .RE
       
  1489 .sp
       
  1490 The following examples show how to set the thread stack size to 1024 KB in different units:
       
  1491 .sp
       
  1492 .if n \{\
       
  1493 .RS 4
       
  1494 .\}
       
  1495 .nf
       
  1496 \fB\-XX:ThreadStackSize=1m\fR
       
  1497 \fB\-XX:ThreadStackSize=1024k\fR
       
  1498 \fB\-XX:ThreadStackSize=1048576\fR
       
  1499  
       
  1500 .fi
       
  1501 .if n \{\
       
  1502 .RE
       
  1503 .\}
       
  1504 This option is equivalent to
       
  1505 \fB\-Xss\fR\&.
       
  1506 .RE
       
  1507 .PP
       
  1508 \-XX:+TraceClassLoading
       
  1509 .RS 4
       
  1510 Enables tracing of classes as they are loaded\&. By default, this option is disabled and classes are not traced\&.
       
  1511 .RE
       
  1512 .PP
       
  1513 \-XX:+TraceClassLoadingPreorder
       
  1514 .RS 4
       
  1515 Enables tracing of all loaded classes in the order in which they are referenced\&. By default, this option is disabled and classes are not traced\&.
       
  1516 .RE
       
  1517 .PP
       
  1518 \-XX:+TraceClassResolution
       
  1519 .RS 4
       
  1520 Enables tracing of constant pool resolutions\&. By default, this option is disabled and constant pool resolutions are not traced\&.
       
  1521 .RE
       
  1522 .PP
       
  1523 \-XX:+TraceClassUnloading
       
  1524 .RS 4
       
  1525 Enables tracing of classes as they are unloaded\&. By default, this option is disabled and classes are not traced\&.
       
  1526 .RE
       
  1527 .PP
       
  1528 \-XX:+TraceLoaderConstraints
       
  1529 .RS 4
       
  1530 Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recording is not traced\&.
       
  1531 .RE
       
  1532 .PP
       
  1533 \-XX:+UseAltSigs
       
  1534 .RS 4
       
  1535 Enables the use of alternative signals instead of
       
  1536 \fBSIGUSR1\fR
       
  1537 and
       
  1538 \fBSIGUSR2\fR
       
  1539 for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to
       
  1540 \fB\-Xusealtsigs\fR\&.
       
  1541 .RE
       
  1542 .PP
       
  1543 \-XX:\-UseBiasedLocking
       
  1544 .RS 4
       
  1545 Disables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning\-139912\&.html#section4\&.2\&.5
       
  1546 .sp
       
  1547 By default, this option is enabled\&.
       
  1548 .RE
       
  1549 .PP
       
  1550 \-XX:\-UseCompressedOops
       
  1551 .RS 4
       
  1552 Disables the use of compressed pointers\&. By default, this option is enabled, and compressed pointers are used when Java heap sizes are less than 32 GB\&. When this option is enabled, object references are represented as 32\-bit offsets instead of 64\-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64\-bit JVMs\&.
       
  1553 .sp
       
  1554 It is also possible to use compressed pointers when Java heap sizes are greater than 32GB\&. See the
       
  1555 \fB\-XX:ObjectAlignmentInBytes\fR
       
  1556 option\&.
       
  1557 .RE
       
  1558 .PP
       
  1559 \-XX:+UseHugeTLBFS
       
  1560 .RS 4
       
  1561 This option for Linux is the equivalent of specifying
       
  1562 \fB\-XX:+UseLargePages\fR\&. This option is disabled by default\&. This option pre\-allocates all large pages up\-front, when memory is reserved; consequently the JVM cannot dynamically grow or shrink large pages memory areas; see
       
  1563 \fB\-XX:UseTransparentHugePages\fR
       
  1564 if you want this behavior\&.
       
  1565 .sp
       
  1566 For more information, see "Large Pages"\&.
       
  1567 .RE
       
  1568 .PP
       
  1569 \-XX:+UseLargePages
       
  1570 .RS 4
       
  1571 Enables the use of large page memory\&. By default, this option is disabled and large page memory is not used\&.
       
  1572 .sp
       
  1573 For more information, see "Large Pages"\&.
       
  1574 .RE
       
  1575 .PP
       
  1576 \-XX:+UseMembar
       
  1577 .RS 4
       
  1578 Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except ARM servers, where it is enabled\&. (It is recommended that you do not disable this option on ARM servers\&.)
       
  1579 .RE
       
  1580 .PP
       
  1581 \-XX:+UsePerfData
       
  1582 .RS 4
       
  1583 Enables the
       
  1584 \fBperfdata\fR
       
  1585 feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the
       
  1586 \fBhsperfdata_userid\fR
       
  1587 directories\&. To disable the
       
  1588 \fBperfdata\fR
       
  1589 feature, specify
       
  1590 \fB\-XX:\-UsePerfData\fR\&.
       
  1591 .RE
       
  1592 .PP
       
  1593 \-XX:+UseTransparentHugePages
       
  1594 .RS 4
       
  1595 On Linux, enables the use of large pages that can dynamically grow or shrink\&. This option is disabled by default\&. You may encounter performance problems with transparent huge pages as the OS moves other pages around to create huge pages; this option is made available for experimentation\&.
       
  1596 .sp
       
  1597 For more information, see "Large Pages"\&.
       
  1598 .RE
       
  1599 .PP
       
  1600 \-XX:+AllowUserSignalHandlers
       
  1601 .RS 4
       
  1602 Enables installation of signal handlers by the application\&. By default, this option is disabled and the application is not allowed to install signal handlers\&.
       
  1603 .RE
       
  1604 .SS "Advanced JIT Compiler Options"
       
  1605 .PP
       
  1606 These options control the dynamic just\-in\-time (JIT) compilation performed by the Java HotSpot VM\&.
       
  1607 .PP
       
  1608 \-XX:AllocateInstancePrefetchLines=\fIlines\fR
       
  1609 .RS 4
       
  1610 Sets the number of lines to prefetch ahead of the instance allocation pointer\&. By default, the number of lines to prefetch is set to 1:
       
  1611 .sp
       
  1612 .if n \{\
       
  1613 .RS 4
       
  1614 .\}
       
  1615 .nf
       
  1616 \fB\-XX:AllocateInstancePrefetchLines=1\fR
       
  1617  
       
  1618 .fi
       
  1619 .if n \{\
       
  1620 .RE
       
  1621 .\}
       
  1622 Only the Java HotSpot Server VM supports this option\&.
       
  1623 .RE
       
  1624 .PP
       
  1625 \-XX:AllocatePrefetchDistance=\fIsize\fR
       
  1626 .RS 4
       
  1627 Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
       
  1628 .sp
       
  1629 Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter
       
  1630 \fBk\fR
       
  1631 or
       
  1632 \fBK\fR
       
  1633 to indicate kilobytes,
       
  1634 \fBm\fR
       
  1635 or
       
  1636 \fBM\fR
       
  1637 to indicate megabytes,
       
  1638 \fBg\fR
       
  1639 or
       
  1640 \fBG\fR
       
  1641 to indicate gigabytes\&. The default value is set to \-1\&.
       
  1642 .sp
       
  1643 The following example shows how to set the prefetch distance to 1024 bytes:
       
  1644 .sp
       
  1645 .if n \{\
       
  1646 .RS 4
       
  1647 .\}
       
  1648 .nf
       
  1649 \fB\-XX:AllocatePrefetchDistance=1024\fR
       
  1650  
       
  1651 .fi
       
  1652 .if n \{\
       
  1653 .RE
       
  1654 .\}
       
  1655 Only the Java HotSpot Server VM supports this option\&.
       
  1656 .RE
       
  1657 .PP
       
  1658 \-XX:AllocatePrefetchInstr=\fIinstruction\fR
       
  1659 .RS 4
       
  1660 Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Only the Java HotSpot Server VM supports this option\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
       
  1661 .sp
       
  1662 .if n \{\
       
  1663 .RS 4
       
  1664 .\}
       
  1665 .nf
       
  1666 \fB\-XX:AllocatePrefetchInstr=0\fR
       
  1667  
       
  1668 .fi
       
  1669 .if n \{\
       
  1670 .RE
       
  1671 .\}
       
  1672 Only the Java HotSpot Server VM supports this option\&.
       
  1673 .RE
       
  1674 .PP
       
  1675 \-XX:AllocatePrefetchLines=\fIlines\fR
       
  1676 .RS 4
       
  1677 Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
       
  1678 .sp
       
  1679 The following example shows how to set the number of loaded cache lines to 5:
       
  1680 .sp
       
  1681 .if n \{\
       
  1682 .RS 4
       
  1683 .\}
       
  1684 .nf
       
  1685 \fB\-XX:AllocatePrefetchLines=5\fR
       
  1686  
       
  1687 .fi
       
  1688 .if n \{\
       
  1689 .RE
       
  1690 .\}
       
  1691 Only the Java HotSpot Server VM supports this option\&.
       
  1692 .RE
       
  1693 .PP
       
  1694 \-XX:AllocatePrefetchStepSize=\fIsize\fR
       
  1695 .RS 4
       
  1696 Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter
       
  1697 \fBk\fR
       
  1698 or
       
  1699 \fBK\fR
       
  1700 to indicate kilobytes,
       
  1701 \fBm\fR
       
  1702 or
       
  1703 \fBM\fR
       
  1704 to indicate megabytes,
       
  1705 \fBg\fR
       
  1706 or
       
  1707 \fBG\fR
       
  1708 to indicate gigabytes\&. By default, the step size is set to 16 bytes:
       
  1709 .sp
       
  1710 .if n \{\
       
  1711 .RS 4
       
  1712 .\}
       
  1713 .nf
       
  1714 \fB\-XX:AllocatePrefetchStepSize=16\fR
       
  1715  
       
  1716 .fi
       
  1717 .if n \{\
       
  1718 .RE
       
  1719 .\}
       
  1720 Only the Java HotSpot Server VM supports this option\&.
       
  1721 .RE
       
  1722 .PP
       
  1723 \-XX:AllocatePrefetchStyle=\fIstyle\fR
       
  1724 .RS 4
       
  1725 Sets the generated code style for prefetch instructions\&. The
       
  1726 \fIstyle\fR
       
  1727 argument is an integer from 0 to 3:
       
  1728 .PP
       
  1729 0
       
  1730 .RS 4
       
  1731 Do not generate prefetch instructions\&.
       
  1732 .RE
       
  1733 .PP
       
  1734 1
       
  1735 .RS 4
       
  1736 Execute prefetch instructions after each allocation\&. This is the default parameter\&.
       
  1737 .RE
       
  1738 .PP
       
  1739 2
       
  1740 .RS 4
       
  1741 Use the thread\-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
       
  1742 .RE
       
  1743 .PP
       
  1744 3
       
  1745 .RS 4
       
  1746 Use BIS instruction on SPARC for allocation prefetch\&.
       
  1747 .RE
       
  1748 .sp
       
  1749 Only the Java HotSpot Server VM supports this option\&.
       
  1750 .RE
       
  1751 .PP
       
  1752 \-XX:+BackgroundCompilation
       
  1753 .RS 4
       
  1754 Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify
       
  1755 \fB\-XX:\-BackgroundCompilation\fR
       
  1756 (this is equivalent to specifying
       
  1757 \fB\-Xbatch\fR)\&.
       
  1758 .RE
       
  1759 .PP
       
  1760 \-XX:CICompilerCount=\fIthreads\fR
       
  1761 .RS 4
       
  1762 Sets the number of compiler threads to use for compilation\&. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used\&. The following example shows how to set the number of threads to 2:
       
  1763 .sp
       
  1764 .if n \{\
       
  1765 .RS 4
       
  1766 .\}
       
  1767 .nf
       
  1768 \fB\-XX:CICompilerCount=2\fR
       
  1769  
       
  1770 .fi
       
  1771 .if n \{\
       
  1772 .RE
       
  1773 .\}
       
  1774 .RE
       
  1775 .PP
       
  1776 \-XX:CodeCacheMinimumFreeSpace=\fIsize\fR
       
  1777 .RS 4
       
  1778 Sets the minimum free space (in bytes) required for compilation\&. Append the letter
       
  1779 \fBk\fR
       
  1780 or
       
  1781 \fBK\fR
       
  1782 to indicate kilobytes,
       
  1783 \fBm\fR
       
  1784 or
       
  1785 \fBM\fR
       
  1786 to indicate megabytes,
       
  1787 \fBg\fR
       
  1788 or
       
  1789 \fBG\fR
       
  1790 to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
       
  1791 .sp
       
  1792 .if n \{\
       
  1793 .RS 4
       
  1794 .\}
       
  1795 .nf
       
  1796 \fB\-XX:CodeCacheMinimumFreeSpace=1024m\fR
       
  1797  
       
  1798 .fi
       
  1799 .if n \{\
       
  1800 .RE
       
  1801 .\}
       
  1802 .RE
       
  1803 .PP
       
  1804 \-XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
       
  1805 .RS 4
       
  1806 Specifies a command to perform on a method\&. For example, to exclude the
       
  1807 \fBindexOf()\fR
       
  1808 method of the
       
  1809 \fBString\fR
       
  1810 class from being compiled, use the following:
       
  1811 .sp
       
  1812 .if n \{\
       
  1813 .RS 4
       
  1814 .\}
       
  1815 .nf
       
  1816 \fB\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fR
       
  1817  
       
  1818 .fi
       
  1819 .if n \{\
       
  1820 .RE
       
  1821 .\}
       
  1822 Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
       
  1823 \fB\-XX:+PrintCompilation\fR
       
  1824 and
       
  1825 \fB\-XX:+LogCompilation\fR
       
  1826 options:
       
  1827 .sp
       
  1828 .if n \{\
       
  1829 .RS 4
       
  1830 .\}
       
  1831 .nf
       
  1832 \fB\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fR
       
  1833  
       
  1834 .fi
       
  1835 .if n \{\
       
  1836 .RE
       
  1837 .\}
       
  1838 If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the
       
  1839 \fBindexOf(String)\fR
       
  1840 method of the
       
  1841 \fBString\fR
       
  1842 class from being compiled, use the following:
       
  1843 .sp
       
  1844 .if n \{\
       
  1845 .RS 4
       
  1846 .\}
       
  1847 .nf
       
  1848 \fB\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fR
       
  1849  
       
  1850 .fi
       
  1851 .if n \{\
       
  1852 .RE
       
  1853 .\}
       
  1854 You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all
       
  1855 \fBindexOf()\fR
       
  1856 methods in all classes from being compiled, use the following:
       
  1857 .sp
       
  1858 .if n \{\
       
  1859 .RS 4
       
  1860 .\}
       
  1861 .nf
       
  1862 \fB\-XX:CompileCommand=exclude,*\&.indexOf\fR
       
  1863  
       
  1864 .fi
       
  1865 .if n \{\
       
  1866 .RE
       
  1867 .\}
       
  1868 The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to
       
  1869 \fB\-XX:CompileCommand\fR
       
  1870 using spaces as separators by enclosing the argument in quotation marks:
       
  1871 .sp
       
  1872 .if n \{\
       
  1873 .RS 4
       
  1874 .\}
       
  1875 .nf
       
  1876 \fB\-XX:CompileCommand="exclude java/lang/String indexOf"\fR
       
  1877  
       
  1878 .fi
       
  1879 .if n \{\
       
  1880 .RE
       
  1881 .\}
       
  1882 Note that after parsing the commands passed on the command line using the
       
  1883 \fB\-XX:CompileCommand\fR
       
  1884 options, the JIT compiler then reads commands from the
       
  1885 \fB\&.hotspot_compiler\fR
       
  1886 file\&. You can add commands to this file or specify a different file using the
       
  1887 \fB\-XX:CompileCommandFile\fR
       
  1888 option\&.
       
  1889 .sp
       
  1890 To add several commands, either specify the
       
  1891 \fB\-XX:CompileCommand\fR
       
  1892 option multiple times, or separate each argument with the newline separator (\fB\en\fR)\&. The following commands are available:
       
  1893 .PP
       
  1894 break
       
  1895 .RS 4
       
  1896 Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method\&.
       
  1897 .RE
       
  1898 .PP
       
  1899 compileonly
       
  1900 .RS 4
       
  1901 Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the
       
  1902 \fB\-XX:CompileOnly\fR
       
  1903 option, which allows to specify several methods\&.
       
  1904 .RE
       
  1905 .PP
       
  1906 dontinline
       
  1907 .RS 4
       
  1908 Prevent inlining of the specified method\&.
       
  1909 .RE
       
  1910 .PP
       
  1911 exclude
       
  1912 .RS 4
       
  1913 Exclude the specified method from compilation\&.
       
  1914 .RE
       
  1915 .PP
       
  1916 help
       
  1917 .RS 4
       
  1918 Print a help message for the
       
  1919 \fB\-XX:CompileCommand\fR
       
  1920 option\&.
       
  1921 .RE
       
  1922 .PP
       
  1923 inline
       
  1924 .RS 4
       
  1925 Attempt to inline the specified method\&.
       
  1926 .RE
       
  1927 .PP
       
  1928 log
       
  1929 .RS 4
       
  1930 Exclude compilation logging (with the
       
  1931 \fB\-XX:+LogCompilation\fR
       
  1932 option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
       
  1933 .RE
       
  1934 .PP
       
  1935 option
       
  1936 .RS 4
       
  1937 This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the
       
  1938 \fBBlockLayoutByFrequency\fR
       
  1939 option for the
       
  1940 \fBappend()\fR
       
  1941 method of the
       
  1942 \fBStringBuffer\fR
       
  1943 class, use the following:
       
  1944 .sp
       
  1945 .if n \{\
       
  1946 .RS 4
       
  1947 .\}
       
  1948 .nf
       
  1949 \fB\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fR
       
  1950  
       
  1951 .fi
       
  1952 .if n \{\
       
  1953 .RE
       
  1954 .\}
       
  1955 You can specify multiple compilation options, separated by commas or spaces\&.
       
  1956 .RE
       
  1957 .PP
       
  1958 print
       
  1959 .RS 4
       
  1960 Print generated assembler code after compilation of the specified method\&.
       
  1961 .RE
       
  1962 .PP
       
  1963 quiet
       
  1964 .RS 4
       
  1965 Do not print the compile commands\&. By default, the commands that you specify with the \-\fBXX:CompileCommand\fR
       
  1966 option are printed; for example, if you exclude from compilation the
       
  1967 \fBindexOf()\fR
       
  1968 method of the
       
  1969 \fBString\fR
       
  1970 class, then the following will be printed to standard output:
       
  1971 .sp
       
  1972 .if n \{\
       
  1973 .RS 4
       
  1974 .\}
       
  1975 .nf
       
  1976 \fBCompilerOracle: exclude java/lang/String\&.indexOf\fR
       
  1977  
       
  1978 .fi
       
  1979 .if n \{\
       
  1980 .RE
       
  1981 .\}
       
  1982 You can suppress this by specifying the
       
  1983 \fB\-XX:CompileCommand=quiet\fR
       
  1984 option before other
       
  1985 \fB\-XX:CompileCommand\fR
       
  1986 options\&.
       
  1987 .RE
       
  1988 .RE
       
  1989 .PP
       
  1990 \-XX:CompileCommandFile=\fIfilename\fR
       
  1991 .RS 4
       
  1992 Sets the file from which JIT compiler commands are read\&. By default, the
       
  1993 \fB\&.hotspot_compiler\fR
       
  1994 file is used to store commands performed by the JIT compiler\&.
       
  1995 .sp
       
  1996 Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the
       
  1997 \fBtoString()\fR
       
  1998 method of the
       
  1999 \fBString\fR
       
  2000 class:
       
  2001 .sp
       
  2002 .if n \{\
       
  2003 .RS 4
       
  2004 .\}
       
  2005 .nf
       
  2006 \fBprint java/lang/String toString\fR
       
  2007  
       
  2008 .fi
       
  2009 .if n \{\
       
  2010 .RE
       
  2011 .\}
       
  2012 For more information about specifying the commands for the JIT compiler to perform on methods, see the
       
  2013 \fB\-XX:CompileCommand\fR
       
  2014 option\&.
       
  2015 .RE
       
  2016 .PP
       
  2017 \-XX:CompileOnly=\fImethods\fR
       
  2018 .RS 4
       
  2019 Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the
       
  2020 \fBlength()\fR
       
  2021 method of the
       
  2022 \fBString\fR
       
  2023 class and the
       
  2024 \fBsize()\fR
       
  2025 method of the
       
  2026 \fBList\fR
       
  2027 class, use the following:
       
  2028 .sp
       
  2029 .if n \{\
       
  2030 .RS 4
       
  2031 .\}
       
  2032 .nf
       
  2033 \fB\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fR
       
  2034  
       
  2035 .fi
       
  2036 .if n \{\
       
  2037 .RE
       
  2038 .\}
       
  2039 Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
       
  2040 \fB\-XX:+PrintCompilation\fR
       
  2041 and
       
  2042 \fB\-XX:+LogCompilation\fR
       
  2043 options:
       
  2044 .sp
       
  2045 .if n \{\
       
  2046 .RS 4
       
  2047 .\}
       
  2048 .nf
       
  2049 \fB\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fR
       
  2050  
       
  2051 .fi
       
  2052 .if n \{\
       
  2053 .RE
       
  2054 .\}
       
  2055 Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:
       
  2056 .sp
       
  2057 .if n \{\
       
  2058 .RS 4
       
  2059 .\}
       
  2060 .nf
       
  2061 \fB\-XX:CompileOnly=java/lang/String\fR
       
  2062 \fB\-XX:CompileOnly=java/lang\fR
       
  2063 \fB\-XX:CompileOnly=\&.length\fR
       
  2064  
       
  2065 .fi
       
  2066 .if n \{\
       
  2067 .RE
       
  2068 .\}
       
  2069 .RE
       
  2070 .PP
       
  2071 \-XX:CompileThreshold=\fIinvocations\fR
       
  2072 .RS 4
       
  2073 Sets the number of interpreted method invocations before compilation\&. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation\&. For the client JVM, the default setting is 1,500 invocations\&. This option is ignored when tiered compilation is enabled; see the option
       
  2074 \fB\-XX:+TieredCompilation\fR\&. The following example shows how to set the number of interpreted method invocations to 5,000:
       
  2075 .sp
       
  2076 .if n \{\
       
  2077 .RS 4
       
  2078 .\}
       
  2079 .nf
       
  2080 \fB\-XX:CompileThreshold=5000\fR
       
  2081  
       
  2082 .fi
       
  2083 .if n \{\
       
  2084 .RE
       
  2085 .\}
       
  2086 You can completely disable interpretation of Java methods before compilation by specifying the
       
  2087 \fB\-Xcomp\fR
       
  2088 option\&.
       
  2089 .RE
       
  2090 .PP
       
  2091 \-XX:+DoEscapeAnalysis
       
  2092 .RS 4
       
  2093 Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify
       
  2094 \fB\-XX:\-DoEscapeAnalysis\fR\&. Only the Java HotSpot Server VM supports this option\&.
       
  2095 .RE
       
  2096 .PP
       
  2097 \-XX:InitialCodeCacheSize=\fIsize\fR
       
  2098 .RS 4
       
  2099 Sets the initial code cache size (in bytes)\&. Append the letter
       
  2100 \fBk\fR
       
  2101 or
       
  2102 \fBK\fR
       
  2103 to indicate kilobytes,
       
  2104 \fBm\fR
       
  2105 or
       
  2106 \fBM\fR
       
  2107 to indicate megabytes,
       
  2108 \fBg\fR
       
  2109 or
       
  2110 \fBG\fR
       
  2111 to indicate gigabytes\&. The default value is set to 500 KB\&. The initial code cache size should be not less than the system\*(Aqs minimal memory page size\&. The following example shows how to set the initial code cache size to 32 KB:
       
  2112 .sp
       
  2113 .if n \{\
       
  2114 .RS 4
       
  2115 .\}
       
  2116 .nf
       
  2117 \fB\-XX:InitialCodeCacheSize=32k\fR
       
  2118  
       
  2119 .fi
       
  2120 .if n \{\
       
  2121 .RE
       
  2122 .\}
       
  2123 .RE
       
  2124 .PP
       
  2125 \-XX:+Inline
       
  2126 .RS 4
       
  2127 Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify
       
  2128 \fB\-XX:\-Inline\fR\&.
       
  2129 .RE
       
  2130 .PP
       
  2131 \-XX:InlineSmallCode=\fIsize\fR
       
  2132 .RS 4
       
  2133 Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter
       
  2134 \fBk\fR
       
  2135 or
       
  2136 \fBK\fR
       
  2137 to indicate kilobytes,
       
  2138 \fBm\fR
       
  2139 or
       
  2140 \fBM\fR
       
  2141 to indicate megabytes,
       
  2142 \fBg\fR
       
  2143 or
       
  2144 \fBG\fR
       
  2145 to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
       
  2146 .sp
       
  2147 .if n \{\
       
  2148 .RS 4
       
  2149 .\}
       
  2150 .nf
       
  2151 \fB\-XX:InlineSmallCode=1000\fR
       
  2152  
       
  2153 .fi
       
  2154 .if n \{\
       
  2155 .RE
       
  2156 .\}
       
  2157 .RE
       
  2158 .PP
       
  2159 \-XX:+LogCompilation
       
  2160 .RS 4
       
  2161 Enables logging of compilation activity to a file named
       
  2162 \fBhotspot\&.log\fR
       
  2163 in the current working directory\&. You can specify a different log file path and name using the
       
  2164 \fB\-XX:LogFile\fR
       
  2165 option\&.
       
  2166 .sp
       
  2167 By default, this option is disabled and compilation activity is not logged\&. The
       
  2168 \fB\-XX:+LogCompilation\fR
       
  2169 option has to be used together with the
       
  2170 \fB\-XX:UnlockDiagnosticVMOptions\fR
       
  2171 option that unlocks diagnostic JVM options\&.
       
  2172 .sp
       
  2173 You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the
       
  2174 \fB\-XX:+PrintCompilation\fR
       
  2175 option\&.
       
  2176 .RE
       
  2177 .PP
       
  2178 \-XX:MaxInlineSize=\fIsize\fR
       
  2179 .RS 4
       
  2180 Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter
       
  2181 \fBk\fR
       
  2182 or
       
  2183 \fBK\fR
       
  2184 to indicate kilobytes,
       
  2185 \fBm\fR
       
  2186 or
       
  2187 \fBM\fR
       
  2188 to indicate megabytes,
       
  2189 \fBg\fR
       
  2190 or
       
  2191 \fBG\fR
       
  2192 to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
       
  2193 .sp
       
  2194 .if n \{\
       
  2195 .RS 4
       
  2196 .\}
       
  2197 .nf
       
  2198 \fB\-XX:MaxInlineSize=35\fR
       
  2199  
       
  2200 .fi
       
  2201 .if n \{\
       
  2202 .RE
       
  2203 .\}
       
  2204 .RE
       
  2205 .PP
       
  2206 \-XX:MaxNodeLimit=\fInodes\fR
       
  2207 .RS 4
       
  2208 Sets the maximum number of nodes to be used during single method compilation\&. By default, the maximum number of nodes is set to 65,000:
       
  2209 .sp
       
  2210 .if n \{\
       
  2211 .RS 4
       
  2212 .\}
       
  2213 .nf
       
  2214 \fB\-XX:MaxNodeLimit=65000\fR
       
  2215  
       
  2216 .fi
       
  2217 .if n \{\
       
  2218 .RE
       
  2219 .\}
       
  2220 .RE
       
  2221 .PP
       
  2222 \-XX:MaxTrivialSize=\fIsize\fR
       
  2223 .RS 4
       
  2224 Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter
       
  2225 \fBk\fR
       
  2226 or
       
  2227 \fBK\fR
       
  2228 to indicate kilobytes,
       
  2229 \fBm\fR
       
  2230 or
       
  2231 \fBM\fR
       
  2232 to indicate megabytes,
       
  2233 \fBg\fR
       
  2234 or
       
  2235 \fBG\fR
       
  2236 to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
       
  2237 .sp
       
  2238 .if n \{\
       
  2239 .RS 4
       
  2240 .\}
       
  2241 .nf
       
  2242 \fB\-XX:MaxTrivialSize=6\fR
       
  2243  
       
  2244 .fi
       
  2245 .if n \{\
       
  2246 .RE
       
  2247 .\}
       
  2248 .RE
       
  2249 .PP
       
  2250 \-XX:+OptimizeStringConcat
       
  2251 .RS 4
       
  2252 Enables the optimization of
       
  2253 \fBString\fR
       
  2254 concatenation operations\&. This option is enabled by default\&. To disable the optimization of
       
  2255 \fBString\fR
       
  2256 concatenation operations, specify
       
  2257 \fB\-XX:\-OptimizeStringConcat\fR\&. Only the Java HotSpot Server VM supports this option\&.
       
  2258 .RE
       
  2259 .PP
       
  2260 \-XX:+PrintAssembly
       
  2261 .RS 4
       
  2262 Enables printing of assembly code for bytecoded and native methods by using the external
       
  2263 \fBdisassembler\&.so\fR
       
  2264 library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
       
  2265 .sp
       
  2266 By default, this option is disabled and assembly code is not printed\&. The
       
  2267 \fB\-XX:+PrintAssembly\fR
       
  2268 option has to be used together with the
       
  2269 \fB\-XX:UnlockDiagnosticVMOptions\fR
       
  2270 option that unlocks diagnostic JVM options\&.
       
  2271 .RE
       
  2272 .PP
       
  2273 \-XX:+PrintCompilation
       
  2274 .RS 4
       
  2275 Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled\&. This enables you to see which methods actually get compiled\&. By default, this option is disabled and diagnostic output is not printed\&.
       
  2276 .sp
       
  2277 You can also log compilation activity to a file by using the
       
  2278 \fB\-XX:+LogCompilation\fR
       
  2279 option\&.
       
  2280 .RE
       
  2281 .PP
       
  2282 \-XX:+PrintInlining
       
  2283 .RS 4
       
  2284 Enables printing of inlining decisions\&. This enables you to see which methods are getting inlined\&.
       
  2285 .sp
       
  2286 By default, this option is disabled and inlining information is not printed\&. The
       
  2287 \fB\-XX:+PrintInlining\fR
       
  2288 option has to be used together with the
       
  2289 \fB\-XX:+UnlockDiagnosticVMOptions\fR
       
  2290 option that unlocks diagnostic JVM options\&.
       
  2291 .RE
       
  2292 .PP
       
  2293 \-XX:ReservedCodeCacheSize=\fIsize\fR
       
  2294 .RS 4
       
  2295 Sets the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
       
  2296 \fBk\fR
       
  2297 or
       
  2298 \fBK\fR
       
  2299 to indicate kilobytes,
       
  2300 \fBm\fR
       
  2301 or
       
  2302 \fBM\fR
       
  2303 to indicate megabytes,
       
  2304 \fBg\fR
       
  2305 or
       
  2306 \fBG\fR
       
  2307 to indicate gigabytes\&. The default maximum code cache size is 240 MB; if you disable tiered compilation with the option
       
  2308 \fB\-XX:\-TieredCompilation\fR, then the default size is 48 MB\&. This option has a limit of 2 GB; otherwise, an error is generated\&. The maximum code cache size should not be less than the initial code cache size; see the option
       
  2309 \fB\-XX:InitialCodeCacheSize\fR\&. This option is equivalent to
       
  2310 \fB\-Xmaxjitcodesize\fR\&.
       
  2311 .RE
       
  2312 .PP
       
  2313 \-XX:RTMAbortRatio=\fIabort_ratio\fR
       
  2314 .RS 4
       
  2315 The RTM abort ratio is specified as a percentage (%) of all executed RTM transactions\&. If a number of aborted transactions becomes greater than this ratio, then the compiled code will be deoptimized\&. This ratio is used when the
       
  2316 \fB\-XX:+UseRTMDeopt\fR
       
  2317 option is enabled\&. The default value of this option is 50\&. This means that the compiled code will be deoptimized if 50% of all transactions are aborted\&.
       
  2318 .RE
       
  2319 .PP
       
  2320 \-XX:RTMRetryCount=\fInumber_of_retries\fR
       
  2321 .RS 4
       
  2322 RTM locking code will be retried, when it is aborted or busy, the number of times specified by this option before falling back to the normal locking mechanism\&. The default value for this option is 5\&. The
       
  2323 \fB\-XX:UseRTMLocking\fR
       
  2324 option must be enabled\&.
       
  2325 .RE
       
  2326 .PP
       
  2327 \-XX:\-TieredCompilation
       
  2328 .RS 4
       
  2329 Disables the use of tiered compilation\&. By default, this option is enabled\&. Only the Java HotSpot Server VM supports this option\&.
       
  2330 .RE
       
  2331 .PP
       
  2332 \-XX:+UseAES
       
  2333 .RS 4
       
  2334 Enables hardware\-based AES intrinsics for Intel, AMD, and SPARC hardware\&. Intel Westmere (2010 and newer), AMD Bulldozer (2011 and newer), and SPARC (T4 and newer) are the supported hardware\&. UseAES is used in conjunction with UseAESIntrinsics\&.
       
  2335 .RE
       
  2336 .PP
       
  2337 \-XX:+UseAESIntrinsics
       
  2338 .RS 4
       
  2339 UseAES and UseAESIntrinsics flags are enabled by default and are supported only for Java HotSpot Server VM 32\-bit and 64\-bit\&. To disable hardware\-based AES intrinsics, specify
       
  2340 \fB\-XX:\-UseAES \-XX:\-UseAESIntrinsics\fR\&. For example, to enable hardware AES, use the following flags:
       
  2341 .sp
       
  2342 .if n \{\
       
  2343 .RS 4
       
  2344 .\}
       
  2345 .nf
       
  2346 \fB\-XX:+UseAES \-XX:+UseAESIntrinsics\fR
       
  2347  
       
  2348 .fi
       
  2349 .if n \{\
       
  2350 .RE
       
  2351 .\}
       
  2352 To support UseAES and UseAESIntrinsics flags for 32\-bit and 64\-bit use
       
  2353 \fB\-server\fR
       
  2354 option to choose Java HotSpot Server VM\&. These flags are not supported on Client VM\&.
       
  2355 .RE
       
  2356 .PP
       
  2357 \-XX:+UseCodeCacheFlushing
       
  2358 .RS 4
       
  2359 Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify
       
  2360 \fB\-XX:\-UseCodeCacheFlushing\fR\&.
       
  2361 .RE
       
  2362 .PP
       
  2363 \-XX:+UseCondCardMark
       
  2364 .RS 4
       
  2365 Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&. Only the Java HotSpot Server VM supports this option\&.
       
  2366 .RE
       
  2367 .PP
       
  2368 \-XX:+UseRTMDeopt
       
  2369 .RS 4
       
  2370 Auto\-tunes RTM locking depending on the abort ratio\&. This ratio is specified by
       
  2371 \fB\-XX:RTMAbortRatio\fR
       
  2372 option\&. If the number of aborted transactions exceeds the abort ratio, then the method containing the lock will be deoptimized and recompiled with all locks as normal locks\&. This option is disabled by default\&. The
       
  2373 \fB\-XX:+UseRTMLocking\fR
       
  2374 option must be enabled\&.
       
  2375 .RE
       
  2376 .PP
       
  2377 \-XX:+UseRTMLocking
       
  2378 .RS 4
       
  2379 Generate Restricted Transactional Memory (RTM) locking code for all inflated locks, with the normal locking mechanism as the fallback handler\&. This option is disabled by default\&. Options related to RTM are only available for the Java HotSpot Server VM on x86 CPUs that support Transactional Synchronization Extensions (TSX)\&.
       
  2380 .sp
       
  2381 RTM is part of Intel\*(Aqs TSX, which is an x86 instruction set extension and facilitates the creation of multithreaded applications\&. RTM introduces the new instructions
       
  2382 \fBXBEGIN\fR,
       
  2383 \fBXABORT\fR,
       
  2384 \fBXEND\fR, and
       
  2385 \fBXTEST\fR\&. The
       
  2386 \fBXBEGIN\fR
       
  2387 and
       
  2388 \fBXEND\fR
       
  2389 instructions enclose a set of instructions to run as a transaction\&. If no conflict is found when running the transaction, the memory and register modifications are committed together at the
       
  2390 \fBXEND\fR
       
  2391 instruction\&. The
       
  2392 \fBXABORT\fR
       
  2393 instruction can be used to explicitly abort a transaction and the
       
  2394 \fBXEND\fR
       
  2395 instruction to check if a set of instructions are being run in a transaction\&.
       
  2396 .sp
       
  2397 A lock on a transaction is inflated when another thread tries to access the same transaction, thereby blocking the thread that did not originally request access to the transaction\&. RTM requires that a fallback set of operations be specified in case a transaction aborts or fails\&. An RTM lock is a lock that has been delegated to the TSX\*(Aqs system\&.
       
  2398 .sp
       
  2399 RTM improves performance for highly contended locks with low conflict in a critical region (which is code that must not be accessed by more than one thread concurrently)\&. RTM also improves the performance of coarse\-grain locking, which typically does not perform well in multithreaded applications\&. (Coarse\-grain locking is the strategy of holding locks for long periods to minimize the overhead of taking and releasing locks, while fine\-grained locking is the strategy of trying to achieve maximum parallelism by locking only when necessary and unlocking as soon as possible\&.) Also, for lightly contended locks that are used by different threads, RTM can reduce false cache line sharing, also known as cache line ping\-pong\&. This occurs when multiple threads from different processors are accessing different resources, but the resources share the same cache line\&. As a result, the processors repeatedly invalidate the cache lines of other processors, which forces them to read from main memory instead of their cache\&.
       
  2400 .RE
       
  2401 .PP
       
  2402 \-XX:+UseSHA
       
  2403 .RS 4
       
  2404 Enables hardware\-based intrinsics for SHA crypto hash functions for SPARC hardware\&.
       
  2405 \fBUseSHA\fR
       
  2406 is used in conjunction with the
       
  2407 \fBUseSHA1Intrinsics\fR,
       
  2408 \fBUseSHA256Intrinsics\fR, and
       
  2409 \fBUseSHA512Intrinsics\fR
       
  2410 options\&.
       
  2411 .sp
       
  2412 The
       
  2413 \fBUseSHA\fR
       
  2414 and
       
  2415 \fBUseSHA*Intrinsics\fR
       
  2416 flags are enabled by default, and are supported only for Java HotSpot Server VM 64\-bit on SPARC T4 and newer\&.
       
  2417 .sp
       
  2418 This feature is only applicable when using the
       
  2419 \fBsun\&.security\&.provider\&.Sun\fR
       
  2420 provider for SHA operations\&.
       
  2421 .sp
       
  2422 To disable all hardware\-based SHA intrinsics, specify
       
  2423 \fB\-XX:\-UseSHA\fR\&. To disable only a particular SHA intrinsic, use the appropriate corresponding option\&. For example:
       
  2424 \fB\-XX:\-UseSHA256Intrinsics\fR\&.
       
  2425 .RE
       
  2426 .PP
       
  2427 \-XX:+UseSHA1Intrinsics
       
  2428 .RS 4
       
  2429 Enables intrinsics for SHA\-1 crypto hash function\&.
       
  2430 .RE
       
  2431 .PP
       
  2432 \-XX:+UseSHA256Intrinsics
       
  2433 .RS 4
       
  2434 Enables intrinsics for SHA\-224 and SHA\-256 crypto hash functions\&.
       
  2435 .RE
       
  2436 .PP
       
  2437 \-XX:+UseSHA512Intrinsics
       
  2438 .RS 4
       
  2439 Enables intrinsics for SHA\-384 and SHA\-512 crypto hash functions\&.
       
  2440 .RE
       
  2441 .PP
       
  2442 \-XX:+UseSuperWord
       
  2443 .RS 4
       
  2444 Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify
       
  2445 \fB\-XX:\-UseSuperWord\fR\&. Only the Java HotSpot Server VM supports this option\&.
       
  2446 .RE
       
  2447 .SS "Advanced Serviceability Options"
       
  2448 .PP
       
  2449 These options provide the ability to gather system information and perform extensive debugging\&.
       
  2450 .PP
       
  2451 \-XX:+ExtendedDTraceProbes
       
  2452 .RS 4
       
  2453 Enables additional
       
  2454 \fBdtrace\fR
       
  2455 tool probes that impact the performance\&. By default, this option is disabled and
       
  2456 \fBdtrace\fR
       
  2457 performs only standard probes\&.
       
  2458 .RE
       
  2459 .PP
       
  2460 \-XX:+HeapDumpOnOutOfMemory
       
  2461 .RS 4
       
  2462 Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a
       
  2463 \fBjava\&.lang\&.OutOfMemoryError\fR
       
  2464 exception is thrown\&. You can explicitly set the heap dump file path and name using the
       
  2465 \fB\-XX:HeapDumpPath\fR
       
  2466 option\&. By default, this option is disabled and the heap is not dumped when an
       
  2467 \fBOutOfMemoryError\fR
       
  2468 exception is thrown\&.
       
  2469 .RE
       
  2470 .PP
       
  2471 \-XX:HeapDumpPath=\fIpath\fR
       
  2472 .RS 4
       
  2473 Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the
       
  2474 \fB\-XX:+HeapDumpOnOutOfMemoryError\fR
       
  2475 option is set\&. By default, the file is created in the current working directory, and it is named
       
  2476 \fBjava_pid\fR\fIpid\fR\fB\&.hprof\fR
       
  2477 where
       
  2478 \fIpid\fR
       
  2479 is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\fB%p\fR
       
  2480 represents the current process identificator):
       
  2481 .sp
       
  2482 .if n \{\
       
  2483 .RS 4
       
  2484 .\}
       
  2485 .nf
       
  2486 \fB\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fR
       
  2487  
       
  2488 .fi
       
  2489 .if n \{\
       
  2490 .RE
       
  2491 .\}
       
  2492 The following example shows how to set the heap dump file to
       
  2493 \fB/var/log/java/java_heapdump\&.hprof\fR:
       
  2494 .sp
       
  2495 .if n \{\
       
  2496 .RS 4
       
  2497 .\}
       
  2498 .nf
       
  2499 \fB\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fR
       
  2500  
       
  2501 .fi
       
  2502 .if n \{\
       
  2503 .RE
       
  2504 .\}
       
  2505 .RE
       
  2506 .PP
       
  2507 \-XX:LogFile=\fIpath\fR
       
  2508 .RS 4
       
  2509 Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named
       
  2510 \fBhotspot\&.log\fR\&.
       
  2511 .sp
       
  2512 The following example shows how to set the log file to
       
  2513 \fB/var/log/java/hotspot\&.log\fR:
       
  2514 .sp
       
  2515 .if n \{\
       
  2516 .RS 4
       
  2517 .\}
       
  2518 .nf
       
  2519 \fB\-XX:LogFile=/var/log/java/hotspot\&.log\fR
       
  2520  
       
  2521 .fi
       
  2522 .if n \{\
       
  2523 .RE
       
  2524 .\}
       
  2525 .RE
       
  2526 .PP
       
  2527 \-XX:+PrintClassHistogram
       
  2528 .RS 4
       
  2529 Enables printing of a class instance histogram after a
       
  2530 \fBControl+C\fR
       
  2531 event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
       
  2532 .sp
       
  2533 Setting this option is equivalent to running the
       
  2534 \fBjmap \-histo\fR
       
  2535 command, or the
       
  2536 \fBjcmd \fR\fIpid\fR\fB GC\&.class_histogram\fR
       
  2537 command, where
       
  2538 \fIpid\fR
       
  2539 is the current Java process identifier\&.
       
  2540 .RE
       
  2541 .PP
       
  2542 \-XX:+PrintConcurrentLocks
       
  2543 .RS 4
       
  2544 Enables printing of locks after a event\&. By default, this option is disabled\&.
       
  2545 .sp
       
  2546 Enables printing of
       
  2547 \fBjava\&.util\&.concurrent\fR
       
  2548 locks after a
       
  2549 \fBControl+C\fR
       
  2550 event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
       
  2551 .sp
       
  2552 Setting this option is equivalent to running the
       
  2553 \fBjstack \-l\fR
       
  2554 command or the
       
  2555 \fBjcmd \fR\fIpid\fR\fB Thread\&.print \-l\fR
       
  2556 command, where
       
  2557 \fIpid\fR
       
  2558 is the current Java process identifier\&.
       
  2559 .RE
       
  2560 .PP
       
  2561 \-XX:+UnlockDiagnosticVMOptions
       
  2562 .RS 4
       
  2563 Unlocks the options intended for diagnosing the JVM\&. By default, this option is disabled and diagnostic options are not available\&.
       
  2564 .RE
       
  2565 .SS "Advanced Garbage Collection Options"
       
  2566 .PP
       
  2567 These options control how garbage collection (GC) is performed by the Java HotSpot VM\&.
       
  2568 .PP
       
  2569 \-XX:+AggressiveHeap
       
  2570 .RS 4
       
  2571 Enables Java heap optimization\&. This sets various parameters to be optimal for long\-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
       
  2572 .RE
       
  2573 .PP
       
  2574 \-XX:+AlwaysPreTouch
       
  2575 .RS 4
       
  2576 Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the
       
  2577 \fBmain()\fR
       
  2578 method\&. The option can be used in testing to simulate a long\-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
       
  2579 .RE
       
  2580 .PP
       
  2581 \-XX:+CMSClassUnloadingEnabled
       
  2582 .RS 4
       
  2583 Enables class unloading when using the concurrent mark\-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify
       
  2584 \fB\-XX:\-CMSClassUnloadingEnabled\fR\&.
       
  2585 .RE
       
  2586 .PP
       
  2587 \-XX:CMSExpAvgFactor=\fIpercent\fR
       
  2588 .RS 4
       
  2589 Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics\&. By default, the exponential averages factor is set to 25%\&. The following example shows how to set the factor to 15%:
       
  2590 .sp
       
  2591 .if n \{\
       
  2592 .RS 4
       
  2593 .\}
       
  2594 .nf
       
  2595 \fB\-XX:CMSExpAvgFactor=15\fR
       
  2596  
       
  2597 .fi
       
  2598 .if n \{\
       
  2599 .RE
       
  2600 .\}
       
  2601 .RE
       
  2602 .PP
       
  2603 \-XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
       
  2604 .RS 4
       
  2605 Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to \-1\&. Any negative value (including the default) implies that
       
  2606 \fB\-XX:CMSTriggerRatio\fR
       
  2607 is used to define the value of the initiating occupancy fraction\&.
       
  2608 .sp
       
  2609 The following example shows how to set the occupancy fraction to 20%:
       
  2610 .sp
       
  2611 .if n \{\
       
  2612 .RS 4
       
  2613 .\}
       
  2614 .nf
       
  2615 \fB\-XX:CMSInitiatingOccupancyFraction=20\fR
       
  2616  
       
  2617 .fi
       
  2618 .if n \{\
       
  2619 .RE
       
  2620 .\}
       
  2621 .RE
       
  2622 .PP
       
  2623 \-XX:+CMSScavengeBeforeRemark
       
  2624 .RS 4
       
  2625 Enables scavenging attempts before the CMS remark step\&. By default, this option is disabled\&.
       
  2626 .RE
       
  2627 .PP
       
  2628 \-XX:CMSTriggerRatio=\fIpercent\fR
       
  2629 .RS 4
       
  2630 Sets the percentage (0 to 100) of the value specified by
       
  2631 \fB\-XX:MinHeapFreeRatio\fR
       
  2632 that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
       
  2633 .sp
       
  2634 The following example shows how to set the occupancy fraction to 75%:
       
  2635 .sp
       
  2636 .if n \{\
       
  2637 .RS 4
       
  2638 .\}
       
  2639 .nf
       
  2640 \fB\-XX:CMSTriggerRatio=75\fR
       
  2641  
       
  2642 .fi
       
  2643 .if n \{\
       
  2644 .RE
       
  2645 .\}
       
  2646 .RE
       
  2647 .PP
       
  2648 \-XX:ConcGCThreads=\fIthreads\fR
       
  2649 .RS 4
       
  2650 Sets the number of threads used for concurrent GC\&. The default value depends on the number of CPUs available to the JVM\&.
       
  2651 .sp
       
  2652 For example, to set the number of threads for concurrent GC to 2, specify the following option:
       
  2653 .sp
       
  2654 .if n \{\
       
  2655 .RS 4
       
  2656 .\}
       
  2657 .nf
       
  2658 \fB\-XX:ConcGCThreads=2\fR
       
  2659  
       
  2660 .fi
       
  2661 .if n \{\
       
  2662 .RE
       
  2663 .\}
       
  2664 .RE
       
  2665 .PP
       
  2666 \-XX:+DisableExplicitGC
       
  2667 .RS 4
       
  2668 Enables the option that disables processing of calls to
       
  2669 \fBSystem\&.gc()\fR\&. This option is disabled by default, meaning that calls to
       
  2670 \fBSystem\&.gc()\fR
       
  2671 are processed\&. If processing of calls to
       
  2672 \fBSystem\&.gc()\fR
       
  2673 is disabled, the JVM still performs GC when necessary\&.
       
  2674 .RE
       
  2675 .PP
       
  2676 \-XX:+ExplicitGCInvokesConcurrent
       
  2677 .RS 4
       
  2678 Enables invoking of concurrent GC by using the
       
  2679 \fBSystem\&.gc()\fR
       
  2680 request\&. This option is disabled by default and can be enabled only together with the
       
  2681 \fB\-XX:+UseConcMarkSweepGC\fR
       
  2682 option\&.
       
  2683 .RE
       
  2684 .PP
       
  2685 \-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
       
  2686 .RS 4
       
  2687 Enables invoking of concurrent GC by using the
       
  2688 \fBSystem\&.gc()\fR
       
  2689 request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the
       
  2690 \fB\-XX:+UseConcMarkSweepGC\fR
       
  2691 option\&.
       
  2692 .RE
       
  2693 .PP
       
  2694 \-XX:G1HeapRegionSize=\fIsize\fR
       
  2695 .RS 4
       
  2696 Sets the size of the regions into which the Java heap is subdivided when using the garbage\-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
       
  2697 .sp
       
  2698 The following example shows how to set the size of the subdivisions to 16 MB:
       
  2699 .sp
       
  2700 .if n \{\
       
  2701 .RS 4
       
  2702 .\}
       
  2703 .nf
       
  2704 \fB\-XX:G1HeapRegionSize=16m\fR
       
  2705  
       
  2706 .fi
       
  2707 .if n \{\
       
  2708 .RE
       
  2709 .\}
       
  2710 .RE
       
  2711 .PP
       
  2712 \-XX:+G1PrintHeapRegions
       
  2713 .RS 4
       
  2714 Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector\&. By default, this option is disabled\&.
       
  2715 .RE
       
  2716 .PP
       
  2717 \-XX:G1ReservePercent=\fIpercent\fR
       
  2718 .RS 4
       
  2719 Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector\&. By default, this option is set to 10%\&.
       
  2720 .sp
       
  2721 The following example shows how to set the reserved heap to 20%:
       
  2722 .sp
       
  2723 .if n \{\
       
  2724 .RS 4
       
  2725 .\}
       
  2726 .nf
       
  2727 \fB\-XX:G1ReservePercent=20\fR
       
  2728  
       
  2729 .fi
       
  2730 .if n \{\
       
  2731 .RE
       
  2732 .\}
       
  2733 .RE
       
  2734 .PP
       
  2735 \-XX:InitialHeapSize=\fIsize\fR
       
  2736 .RS 4
       
  2737 Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter
       
  2738 \fBk\fR
       
  2739 or
       
  2740 \fBK\fR
       
  2741 to indicate kilobytes,
       
  2742 \fBm\fR
       
  2743 or
       
  2744 \fBM\fR
       
  2745 to indicate megabytes,
       
  2746 \fBg\fR
       
  2747 or
       
  2748 \fBG\fR
       
  2749 to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. See the section "Ergonomics" in
       
  2750 \fIJava SE HotSpot Virtual Machine Garbage Collection Tuning Guide\fR
       
  2751 at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gctuning/index\&.html\&.
       
  2752 .sp
       
  2753 The following examples show how to set the size of allocated memory to 6 MB using various units:
       
  2754 .sp
       
  2755 .if n \{\
       
  2756 .RS 4
       
  2757 .\}
       
  2758 .nf
       
  2759 \fB\-XX:InitialHeapSize=6291456\fR
       
  2760 \fB\-XX:InitialHeapSize=6144k\fR
       
  2761 \fB\-XX:InitialHeapSize=6m\fR
       
  2762  
       
  2763 .fi
       
  2764 .if n \{\
       
  2765 .RE
       
  2766 .\}
       
  2767 If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the
       
  2768 \fB\-XX:NewSize\fR
       
  2769 option\&.
       
  2770 .RE
       
  2771 .PP
       
  2772 \-XX:InitialSurvivorRatio=\fIratio\fR
       
  2773 .RS 4
       
  2774 Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the
       
  2775 \fB\-XX:+UseParallelGC\fR
       
  2776 and/or \-\fBXX:+UseParallelOldGC\fR
       
  2777 options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the
       
  2778 \fB\-XX:+UseParallelGC\fR
       
  2779 and
       
  2780 \fB\-XX:+UseParallelOldGC\fR
       
  2781 options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the
       
  2782 \fB\-XX:\-UseAdaptiveSizePolicy\fR
       
  2783 option), then the
       
  2784 \fB\-XX:SurvivorRatio\fR
       
  2785 option should be used to set the size of the survivor space for the entire execution of the application\&.
       
  2786 .sp
       
  2787 The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):
       
  2788 .sp
       
  2789 .if n \{\
       
  2790 .RS 4
       
  2791 .\}
       
  2792 .nf
       
  2793 \fBS=Y/(R+2)\fR
       
  2794  
       
  2795 .fi
       
  2796 .if n \{\
       
  2797 .RE
       
  2798 .\}
       
  2799 The 2 in the equation denotes two survivor spaces\&. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size\&.
       
  2800 .sp
       
  2801 By default, the initial survivor space ratio is set to 8\&. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0\&.2 MB\&.
       
  2802 .sp
       
  2803 The following example shows how to set the initial survivor space ratio to 4:
       
  2804 .sp
       
  2805 .if n \{\
       
  2806 .RS 4
       
  2807 .\}
       
  2808 .nf
       
  2809 \fB\-XX:InitialSurvivorRatio=4\fR
       
  2810  
       
  2811 .fi
       
  2812 .if n \{\
       
  2813 .RE
       
  2814 .\}
       
  2815 .RE
       
  2816 .PP
       
  2817 \-XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
       
  2818 .RS 4
       
  2819 Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle\&. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector)\&.
       
  2820 .sp
       
  2821 By default, the initiating value is set to 45%\&. A value of 0 implies nonstop GC cycles\&. The following example shows how to set the initiating heap occupancy to 75%:
       
  2822 .sp
       
  2823 .if n \{\
       
  2824 .RS 4
       
  2825 .\}
       
  2826 .nf
       
  2827 \fB\-XX:InitiatingHeapOccupancyPercent=75\fR
       
  2828  
       
  2829 .fi
       
  2830 .if n \{\
       
  2831 .RE
       
  2832 .\}
       
  2833 .RE
       
  2834 .PP
       
  2835 \-XX:MaxGCPauseMillis=\fItime\fR
       
  2836 .RS 4
       
  2837 Sets a target for the maximum GC pause time (in milliseconds)\&. This is a soft goal, and the JVM will make its best effort to achieve it\&. By default, there is no maximum pause time value\&.
       
  2838 .sp
       
  2839 The following example shows how to set the maximum target pause time to 500 ms:
       
  2840 .sp
       
  2841 .if n \{\
       
  2842 .RS 4
       
  2843 .\}
       
  2844 .nf
       
  2845 \fB\-XX:MaxGCPauseMillis=500\fR
       
  2846  
       
  2847 .fi
       
  2848 .if n \{\
       
  2849 .RE
       
  2850 .\}
       
  2851 .RE
       
  2852 .PP
       
  2853 \-XX:MaxHeapSize=\fIsize\fR
       
  2854 .RS 4
       
  2855 Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
       
  2856 \fBk\fR
       
  2857 or
       
  2858 \fBK\fR
       
  2859 to indicate kilobytes,
       
  2860 \fBm\fR
       
  2861 or
       
  2862 \fBM\fR
       
  2863 to indicate megabytes,
       
  2864 \fBg\fR
       
  2865 or
       
  2866 \fBG\fR
       
  2867 to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
       
  2868 \fB\-XX:InitialHeapSize\fR
       
  2869 and
       
  2870 \fB\-XX:MaxHeapSize\fR
       
  2871 are often set to the same value\&. See the section "Ergonomics" in
       
  2872 \fIJava SE HotSpot Virtual Machine Garbage Collection Tuning Guide\fR
       
  2873 at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gctuning/index\&.html\&.
       
  2874 .sp
       
  2875 The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
       
  2876 .sp
       
  2877 .if n \{\
       
  2878 .RS 4
       
  2879 .\}
       
  2880 .nf
       
  2881 \fB\-XX:MaxHeapSize=83886080\fR
       
  2882 \fB\-XX:MaxHeapSize=81920k\fR
       
  2883 \fB\-XX:MaxHeapSize=80m\fR
       
  2884  
       
  2885 .fi
       
  2886 .if n \{\
       
  2887 .RE
       
  2888 .\}
       
  2889 On Oracle Solaris 7 and Oracle Solaris 8 SPARC platforms, the upper limit for this value is approximately 4,000 MB minus overhead amounts\&. On Oracle Solaris 2\&.6 and x86 platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&. On Linux platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&.
       
  2890 .sp
       
  2891 The
       
  2892 \fB\-XX:MaxHeapSize\fR
       
  2893 option is equivalent to
       
  2894 \fB\-Xmx\fR\&.
       
  2895 .RE
       
  2896 .PP
       
  2897 \-XX:MaxHeapFreeRatio=\fIpercent\fR
       
  2898 .RS 4
       
  2899 Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space expands above this value, then the heap will be shrunk\&. By default, this value is set to 70%\&.
       
  2900 .sp
       
  2901 The following example shows how to set the maximum free heap ratio to 75%:
       
  2902 .sp
       
  2903 .if n \{\
       
  2904 .RS 4
       
  2905 .\}
       
  2906 .nf
       
  2907 \fB\-XX:MaxHeapFreeRatio=75\fR
       
  2908  
       
  2909 .fi
       
  2910 .if n \{\
       
  2911 .RE
       
  2912 .\}
       
  2913 .RE
       
  2914 .PP
       
  2915 \-XX:MaxMetaspaceSize=\fIsize\fR
       
  2916 .RS 4
       
  2917 Sets the maximum amount of native memory that can be allocated for class metadata\&. By default, the size is not limited\&. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system\&.
       
  2918 .sp
       
  2919 The following example shows how to set the maximum class metadata size to 256 MB:
       
  2920 .sp
       
  2921 .if n \{\
       
  2922 .RS 4
       
  2923 .\}
       
  2924 .nf
       
  2925 \fB\-XX:MaxMetaspaceSize=256m\fR
       
  2926  
       
  2927 .fi
       
  2928 .if n \{\
       
  2929 .RE
       
  2930 .\}
       
  2931 .RE
       
  2932 .PP
       
  2933 \-XX:MaxNewSize=\fIsize\fR
       
  2934 .RS 4
       
  2935 Sets the maximum size (in bytes) of the heap for the young generation (nursery)\&. The default value is set ergonomically\&.
       
  2936 .RE
       
  2937 .PP
       
  2938 \-XX:MaxTenuringThreshold=\fIthreshold\fR
       
  2939 .RS 4
       
  2940 Sets the maximum tenuring threshold for use in adaptive GC sizing\&. The largest value is 15\&. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector\&.
       
  2941 .sp
       
  2942 The following example shows how to set the maximum tenuring threshold to 10:
       
  2943 .sp
       
  2944 .if n \{\
       
  2945 .RS 4
       
  2946 .\}
       
  2947 .nf
       
  2948 \fB\-XX:MaxTenuringThreshold=10\fR
       
  2949  
       
  2950 .fi
       
  2951 .if n \{\
       
  2952 .RE
       
  2953 .\}
       
  2954 .RE
       
  2955 .PP
       
  2956 \-XX:MetaspaceSize=\fIsize\fR
       
  2957 .RS 4
       
  2958 Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded\&. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used\&. The default size depends on the platform\&.
       
  2959 .RE
       
  2960 .PP
       
  2961 \-XX:MinHeapFreeRatio=\fIpercent\fR
       
  2962 .RS 4
       
  2963 Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space falls below this value, then the heap will be expanded\&. By default, this value is set to 40%\&.
       
  2964 .sp
       
  2965 The following example shows how to set the minimum free heap ratio to 25%:
       
  2966 .sp
       
  2967 .if n \{\
       
  2968 .RS 4
       
  2969 .\}
       
  2970 .nf
       
  2971 \fB\-XX:MinHeapFreeRatio=25\fR
       
  2972  
       
  2973 .fi
       
  2974 .if n \{\
       
  2975 .RE
       
  2976 .\}
       
  2977 .RE
       
  2978 .PP
       
  2979 \-XX:NewRatio=\fIratio\fR
       
  2980 .RS 4
       
  2981 Sets the ratio between young and old generation sizes\&. By default, this option is set to 2\&. The following example shows how to set the young/old ratio to 1:
       
  2982 .sp
       
  2983 .if n \{\
       
  2984 .RS 4
       
  2985 .\}
       
  2986 .nf
       
  2987 \fB\-XX:NewRatio=1\fR
       
  2988  
       
  2989 .fi
       
  2990 .if n \{\
       
  2991 .RE
       
  2992 .\}
       
  2993 .RE
       
  2994 .PP
       
  2995 \-XX:NewSize=\fIsize\fR
       
  2996 .RS 4
       
  2997 Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
       
  2998 \fBk\fR
       
  2999 or
       
  3000 \fBK\fR
       
  3001 to indicate kilobytes,
       
  3002 \fBm\fR
       
  3003 or
       
  3004 \fBM\fR
       
  3005 to indicate megabytes,
       
  3006 \fBg\fR
       
  3007 or
       
  3008 \fBG\fR
       
  3009 to indicate gigabytes\&.
       
  3010 .sp
       
  3011 The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too low, then a large number of minor GCs will be performed\&. If the size is too high, then only full GCs will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
       
  3012 .sp
       
  3013 The following examples show how to set the initial size of young generation to 256 MB using various units:
       
  3014 .sp
       
  3015 .if n \{\
       
  3016 .RS 4
       
  3017 .\}
       
  3018 .nf
       
  3019 \fB\-XX:NewSize=256m\fR
       
  3020 \fB\-XX:NewSize=262144k\fR
       
  3021 \fB\-XX:NewSize=268435456\fR
       
  3022  
       
  3023 .fi
       
  3024 .if n \{\
       
  3025 .RE
       
  3026 .\}
       
  3027 The
       
  3028 \fB\-XX:NewSize\fR
       
  3029 option is equivalent to
       
  3030 \fB\-Xmn\fR\&.
       
  3031 .RE
       
  3032 .PP
       
  3033 \-XX:ParallelGCThreads=\fIthreads\fR
       
  3034 .RS 4
       
  3035 Sets the number of threads used for parallel garbage collection in the young and old generations\&. The default value depends on the number of CPUs available to the JVM\&.
       
  3036 .sp
       
  3037 For example, to set the number of threads for parallel GC to 2, specify the following option:
       
  3038 .sp
       
  3039 .if n \{\
       
  3040 .RS 4
       
  3041 .\}
       
  3042 .nf
       
  3043 \fB\-XX:ParallelGCThreads=2\fR
       
  3044  
       
  3045 .fi
       
  3046 .if n \{\
       
  3047 .RE
       
  3048 .\}
       
  3049 .RE
       
  3050 .PP
       
  3051 \-XX:+ParallelRefProcEnabled
       
  3052 .RS 4
       
  3053 Enables parallel reference processing\&. By default, this option is disabled\&.
       
  3054 .RE
       
  3055 .PP
       
  3056 \-XX:+PrintAdaptiveSizePolicy
       
  3057 .RS 4
       
  3058 Enables printing of information about adaptive generation sizing\&. By default, this option is disabled\&.
       
  3059 .RE
       
  3060 .PP
       
  3061 \-XX:+PrintGC
       
  3062 .RS 4
       
  3063 Enables printing of messages at every GC\&. By default, this option is disabled\&.
       
  3064 .RE
       
  3065 .PP
       
  3066 \-XX:+PrintGCApplicationConcurrentTime
       
  3067 .RS 4
       
  3068 Enables printing of how much time elapsed since the last pause (for example, a GC pause)\&. By default, this option is disabled\&.
       
  3069 .RE
       
  3070 .PP
       
  3071 \-XX:+PrintGCApplicationStoppedTime
       
  3072 .RS 4
       
  3073 Enables printing of how much time the pause (for example, a GC pause) lasted\&. By default, this option is disabled\&.
       
  3074 .RE
       
  3075 .PP
       
  3076 \-XX:+PrintGCDateStamps
       
  3077 .RS 4
       
  3078 Enables printing of a date stamp at every GC\&. By default, this option is disabled\&.
       
  3079 .RE
       
  3080 .PP
       
  3081 \-XX:+PrintGCDetails
       
  3082 .RS 4
       
  3083 Enables printing of detailed messages at every GC\&. By default, this option is disabled\&.
       
  3084 .RE
       
  3085 .PP
       
  3086 \-XX:+PrintGCTaskTimeStamps
       
  3087 .RS 4
       
  3088 Enables printing of time stamps for every individual GC worker thread task\&. By default, this option is disabled\&.
       
  3089 .RE
       
  3090 .PP
       
  3091 \-XX:+PrintGCTimeStamps
       
  3092 .RS 4
       
  3093 Enables printing of time stamps at every GC\&. By default, this option is disabled\&.
       
  3094 .RE
       
  3095 .PP
       
  3096 \-XX:+PrintStringDeduplicationStatistics
       
  3097 .RS 4
       
  3098 Prints detailed deduplication statistics\&. By default, this option is disabled\&. See the
       
  3099 \fB\-XX:+UseStringDeduplication\fR
       
  3100 option\&.
       
  3101 .RE
       
  3102 .PP
       
  3103 \-XX:+PrintTenuringDistribution
       
  3104 .RS 4
       
  3105 Enables printing of tenuring age information\&. The following is an example of the output:
       
  3106 .sp
       
  3107 .if n \{\
       
  3108 .RS 4
       
  3109 .\}
       
  3110 .nf
       
  3111 \fBDesired survivor size 48286924 bytes, new threshold 10 (max 10)\fR
       
  3112 \fB\- age 1: 28992024 bytes, 28992024 total\fR
       
  3113 \fB\- age 2: 1366864 bytes, 30358888 total\fR
       
  3114 \fB\- age 3: 1425912 bytes, 31784800 total\fR
       
  3115 \fB\&.\&.\&.\fR
       
  3116  
       
  3117 .fi
       
  3118 .if n \{\
       
  3119 .RE
       
  3120 .\}
       
  3121 Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space)\&. Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next)\&. And so on\&.
       
  3122 .sp
       
  3123 In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc\&. The third value in each row is the cumulative size of objects of age n or less\&.
       
  3124 .sp
       
  3125 By default, this option is disabled\&.
       
  3126 .RE
       
  3127 .PP
       
  3128 \-XX:+ScavengeBeforeFullGC
       
  3129 .RS 4
       
  3130 Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you
       
  3131 \fIdo not\fR
       
  3132 disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify
       
  3133 \fB\-XX:\-ScavengeBeforeFullGC\fR\&.
       
  3134 .RE
       
  3135 .PP
       
  3136 \-XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
       
  3137 .RS 4
       
  3138 Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The
       
  3139 \fB\-XX:SoftRefLRUPolicyMSPerMB\fR
       
  3140 option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the
       
  3141 \fB\-Xmx\fR
       
  3142 option has a significant effect on how quickly soft references are garbage collected\&.
       
  3143 .sp
       
  3144 The following example shows how to set the value to 2\&.5 seconds:
       
  3145 .sp
       
  3146 .if n \{\
       
  3147 .RS 4
       
  3148 .\}
       
  3149 .nf
       
  3150 \fB\-XX:SoftRefLRUPolicyMSPerMB=2500\fR
       
  3151  
       
  3152 .fi
       
  3153 .if n \{\
       
  3154 .RE
       
  3155 .\}
       
  3156 .RE
       
  3157 .PP
       
  3158 \-XX:StringDeduplicationAgeThreshold=\fIthreshold\fR
       
  3159 .RS 4
       
  3160 \fBString\fR
       
  3161 objects reaching the specified age are considered candidates for deduplication\&. An object\*(Aqs age is a measure of how many times it has survived garbage collection\&. This is sometimes referred to as tenuring; see the
       
  3162 \fB\-XX:+PrintTenuringDistribution\fR
       
  3163 option\&. Note that
       
  3164 \fBString\fR
       
  3165 objects that are promoted to an old heap region before this age has been reached are always considered candidates for deduplication\&. The default value for this option is
       
  3166 \fB3\fR\&. See the
       
  3167 \fB\-XX:+UseStringDeduplication\fR
       
  3168 option\&.
       
  3169 .RE
       
  3170 .PP
       
  3171 \-XX:SurvivorRatio=\fIratio\fR
       
  3172 .RS 4
       
  3173 Sets the ratio between eden space size and survivor space size\&. By default, this option is set to 8\&. The following example shows how to set the eden/survivor space ratio to 4:
       
  3174 .sp
       
  3175 .if n \{\
       
  3176 .RS 4
       
  3177 .\}
       
  3178 .nf
       
  3179 \fB\-XX:SurvivorRatio=4\fR
       
  3180  
       
  3181 .fi
       
  3182 .if n \{\
       
  3183 .RE
       
  3184 .\}
       
  3185 .RE
       
  3186 .PP
       
  3187 \-XX:TargetSurvivorRatio=\fIpercent\fR
       
  3188 .RS 4
       
  3189 Sets the desired percentage of survivor space (0 to 100) used after young garbage collection\&. By default, this option is set to 50%\&.
       
  3190 .sp
       
  3191 The following example shows how to set the target survivor space ratio to 30%:
       
  3192 .sp
       
  3193 .if n \{\
       
  3194 .RS 4
       
  3195 .\}
       
  3196 .nf
       
  3197 \fB\-XX:TargetSurvivorRatio=30\fR
       
  3198  
       
  3199 .fi
       
  3200 .if n \{\
       
  3201 .RE
       
  3202 .\}
       
  3203 .RE
       
  3204 .PP
       
  3205 \-XX:TLABSize=\fIsize\fR
       
  3206 .RS 4
       
  3207 Sets the initial size (in bytes) of a thread\-local allocation buffer (TLAB)\&. Append the letter
       
  3208 \fBk\fR
       
  3209 or
       
  3210 \fBK\fR
       
  3211 to indicate kilobytes,
       
  3212 \fBm\fR
       
  3213 or
       
  3214 \fBM\fR
       
  3215 to indicate megabytes,
       
  3216 \fBg\fR
       
  3217 or
       
  3218 \fBG\fR
       
  3219 to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
       
  3220 .sp
       
  3221 The following example shows how to set the initial TLAB size to 512 KB:
       
  3222 .sp
       
  3223 .if n \{\
       
  3224 .RS 4
       
  3225 .\}
       
  3226 .nf
       
  3227 \fB\-XX:TLABSize=512k\fR
       
  3228  
       
  3229 .fi
       
  3230 .if n \{\
       
  3231 .RE
       
  3232 .\}
       
  3233 .RE
       
  3234 .PP
       
  3235 \-XX:+UseAdaptiveSizePolicy
       
  3236 .RS 4
       
  3237 Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify
       
  3238 \fB\-XX:\-UseAdaptiveSizePolicy\fR
       
  3239 and set the size of the memory allocation pool explicitly (see the
       
  3240 \fB\-XX:SurvivorRatio\fR
       
  3241 option)\&.
       
  3242 .RE
       
  3243 .PP
       
  3244 \-XX:+UseCMSInitiatingOccupancyOnly
       
  3245 .RS 4
       
  3246 Enables the use of the occupancy value as the only criterion for initiating the CMS collector\&. By default, this option is disabled and other criteria may be used\&.
       
  3247 .RE
       
  3248 .PP
       
  3249 \-XX:+UseConcMarkSweepGC
       
  3250 .RS 4
       
  3251 Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\fB\-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\fB\-XX:+UseG1GC\fR) is another alternative\&.
       
  3252 .sp
       
  3253 By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the
       
  3254 \fB\-XX:+UseParNewGC\fR
       
  3255 option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8:
       
  3256 \fB\-XX:+UseConcMarkSweepGC \-XX:\-UseParNewGC\fR\&.
       
  3257 .RE
       
  3258 .PP
       
  3259 \-XX:+UseG1GC
       
  3260 .RS 4
       
  3261 Enables the use of the garbage\-first (G1) garbage collector\&. It is a server\-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
       
  3262 .sp
       
  3263 By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
       
  3264 .RE
       
  3265 .PP
       
  3266 \-XX:+UseGCOverheadLimit
       
  3267 .RS 4
       
  3268 Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an
       
  3269 \fBOutOfMemoryError\fR
       
  3270 exception is thrown\&. This option is enabled, by default and the parallel GC will throw an
       
  3271 \fBOutOfMemoryError\fR
       
  3272 if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify
       
  3273 \fB\-XX:\-UseGCOverheadLimit\fR\&.
       
  3274 .RE
       
  3275 .PP
       
  3276 \-XX:+UseNUMA
       
  3277 .RS 4
       
  3278 Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\*(Aqs use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\fB\-XX:+UseParallelGC\fR)\&.
       
  3279 .RE
       
  3280 .PP
       
  3281 \-XX:+UseParallelGC
       
  3282 .RS 4
       
  3283 Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors\&.
       
  3284 .sp
       
  3285 By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the
       
  3286 \fB\-XX:+UseParallelOldGC\fR
       
  3287 option is automatically enabled, unless you explicitly disable it\&.
       
  3288 .RE
       
  3289 .PP
       
  3290 \-XX:+UseParallelOldGC
       
  3291 .RS 4
       
  3292 Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the
       
  3293 \fB\-XX:+UseParallelGC\fR
       
  3294 option\&.
       
  3295 .RE
       
  3296 .PP
       
  3297 \-XX:+UseParNewGC
       
  3298 .RS 4
       
  3299 Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the
       
  3300 \fB\-XX:+UseConcMarkSweepGC\fR
       
  3301 option\&. Using the
       
  3302 \fB\-XX:+UseParNewGC\fR
       
  3303 option without the
       
  3304 \fB\-XX:+UseConcMarkSweepGC\fR
       
  3305 option was deprecated in JDK 8\&.
       
  3306 .RE
       
  3307 .PP
       
  3308 \-XX:+UseSerialGC
       
  3309 .RS 4
       
  3310 Enables the use of the serial garbage collector\&. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection\&. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
       
  3311 .RE
       
  3312 .PP
       
  3313 \-XX:+UseSHM
       
  3314 .RS 4
       
  3315 On Linux, enables the JVM to use shared memory to setup large pages\&.
       
  3316 .sp
       
  3317 For more information, see "Large Pages"\&.
       
  3318 .RE
       
  3319 .PP
       
  3320 \-XX:+UseStringDeduplication
       
  3321 .RS 4
       
  3322 Enables string deduplication\&. By default, this option is disabled\&. To use this option, you must enable the garbage\-first (G1) garbage collector\&. See the
       
  3323 \fB\-XX:+UseG1GC\fR
       
  3324 option\&.
       
  3325 .sp
       
  3326 \fIString deduplication\fR
       
  3327 reduces the memory footprint of
       
  3328 \fBString\fR
       
  3329 objects on the Java heap by taking advantage of the fact that many
       
  3330 \fBString\fR
       
  3331 objects are identical\&. Instead of each
       
  3332 \fBString\fR
       
  3333 object pointing to its own character array, identical
       
  3334 \fBString\fR
       
  3335 objects can point to and share the same character array\&.
       
  3336 .RE
       
  3337 .PP
       
  3338 \-XX:+UseTLAB
       
  3339 .RS 4
       
  3340 Enables the use of thread\-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify
       
  3341 \fB\-XX:\-UseTLAB\fR\&.
       
  3342 .RE
       
  3343 .SS "Deprecated and Removed Options"
       
  3344 .PP
       
  3345 These options were included in the previous release, but have since been considered unnecessary\&.
       
  3346 .PP
       
  3347 \-Xincgc
       
  3348 .RS 4
       
  3349 Enables incremental garbage collection\&. This option was deprecated in JDK 8 with no replacement\&.
       
  3350 .RE
       
  3351 .PP
       
  3352 \-Xrun\fIlibname\fR
       
  3353 .RS 4
       
  3354 Loads the specified debugging/profiling library\&. This option was superseded by the
       
  3355 \fB\-agentlib\fR
       
  3356 option\&.
       
  3357 .RE
       
  3358 .PP
       
  3359 \-XX:CMSIncrementalDutyCycle=\fIpercent\fR
       
  3360 .RS 4
       
  3361 Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
       
  3362 \fB\-XX:+CMSIncrementalMode\fR
       
  3363 option\&.
       
  3364 .RE
       
  3365 .PP
       
  3366 \-XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
       
  3367 .RS 4
       
  3368 Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when
       
  3369 \fB\-XX:+CMSIncrementalPacing\fR
       
  3370 is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
       
  3371 \fB\-XX:+CMSIncrementalMode\fR
       
  3372 option\&.
       
  3373 .RE
       
  3374 .PP
       
  3375 \-XX:+CMSIncrementalMode
       
  3376 .RS 4
       
  3377 Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with
       
  3378 \fBCMSIncremental\fR\&.
       
  3379 .RE
       
  3380 .PP
       
  3381 \-XX:CMSIncrementalOffset=\fIpercent\fR
       
  3382 .RS 4
       
  3383 Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
       
  3384 \fB\-XX:+CMSIncrementalMode\fR
       
  3385 option\&.
       
  3386 .RE
       
  3387 .PP
       
  3388 \-XX:+CMSIncrementalPacing
       
  3389 .RS 4
       
  3390 Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
       
  3391 \fB\-XX:+CMSIncrementalMode\fR
       
  3392 option\&.
       
  3393 .RE
       
  3394 .PP
       
  3395 \-XX:CMSIncrementalSafetyFactor=\fIpercent\fR
       
  3396 .RS 4
       
  3397 Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
       
  3398 \fB\-XX:+CMSIncrementalMode\fR
       
  3399 option\&.
       
  3400 .RE
       
  3401 .PP
       
  3402 \-XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
       
  3403 .RS 4
       
  3404 Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC\&. This option was deprecated in JDK 8 with no replacement\&.
       
  3405 .RE
       
  3406 .PP
       
  3407 \-XX:MaxPermSize=\fIsize\fR
       
  3408 .RS 4
       
  3409 Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the
       
  3410 \fB\-XX:MaxMetaspaceSize\fR
       
  3411 option\&.
       
  3412 .RE
       
  3413 .PP
       
  3414 \-XX:PermSize=\fIsize\fR
       
  3415 .RS 4
       
  3416 Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the
       
  3417 \fB\-XX:MetaspaceSize\fR
       
  3418 option\&.
       
  3419 .RE
       
  3420 .PP
       
  3421 \-XX:+UseSplitVerifier
       
  3422 .RS 4
       
  3423 Enables splitting of the verification process\&. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime)\&. This option was deprecated in JDK 8, and verification is now split by default without a way to disable it\&.
       
  3424 .RE
       
  3425 .PP
       
  3426 \-XX:+UseStringCache
       
  3427 .RS 4
       
  3428 Enables caching of commonly allocated strings\&. This option was removed from JDK 8 with no replacement\&.
       
  3429 .RE
       
  3430 .SH "PERFORMANCE TUNING EXAMPLES"
       
  3431 .PP
       
  3432 The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time\&.
       
  3433 .PP
       
  3434 \fBExample 1 \fRTuning for Higher Throughput
       
  3435 .RS 4
       
  3436 .sp
       
  3437 .if n \{\
       
  3438 .RS 4
       
  3439 .\}
       
  3440 .nf
       
  3441 \fBjava \-d64 \-server \-XX:+UseLargePages \-Xmn10g  \-Xms26g \-Xmx26g\fR
       
  3442  
       
  3443 .fi
       
  3444 .if n \{\
       
  3445 .RE
       
  3446 .\}
       
  3447 .RE
       
  3448 .PP
       
  3449 \fBExample 2 \fRTuning for Lower Response Time
       
  3450 .RS 4
       
  3451 .sp
       
  3452 .if n \{\
       
  3453 .RS 4
       
  3454 .\}
       
  3455 .nf
       
  3456 \fBjava \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fR
       
  3457  
       
  3458 .fi
       
  3459 .if n \{\
       
  3460 .RE
       
  3461 .\}
       
  3462 .RE
       
  3463 .SH "LARGE PAGES"
       
  3464 .PP
       
  3465 Also known as huge pages, large pages are memory pages that are significantly larger than the standard memory page size (which varies depending on the processor and operating system)\&. Large pages optimize processor Translation\-Lookaside Buffers\&.
       
  3466 .PP
       
  3467 A Translation\-Lookaside Buffer (TLB) is a page translation cache that holds the most\-recently used virtual\-to\-physical address translations\&. TLB is a scarce system resource\&. A TLB miss can be costly as the processor must then read from the hierarchical page table, which may require multiple memory accesses\&. By using a larger memory page size, a single TLB entry can represent a larger memory range\&. There will be less pressure on TLB, and memory\-intensive applications may have better performance\&.
       
  3468 .PP
       
  3469 However, large pages page memory can negatively affect system performance\&. For example, when a large mount of memory is pinned by an application, it may create a shortage of regular memory and cause excessive paging in other applications and slow down the entire system\&. Also, a system that has been up for a long time could produce excessive fragmentation, which could make it impossible to reserve enough large page memory\&. When this happens, either the OS or JVM reverts to using regular pages\&.
       
  3470 .SS "Large Pages Support"
       
  3471 .PP
       
  3472 Solaris and Linux support large pages\&.
       
  3473 .sp
       
  3474 .it 1 an-trap
       
  3475 .nr an-no-space-flag 1
       
  3476 .nr an-break-flag 1
       
  3477 .br
       
  3478 .ps +1
       
  3479 \fBSolaris\fR
       
  3480 .RS 4
       
  3481 .PP
       
  3482 Solaris 9 and later include Multiple Page Size Support (MPSS); no additional configuration is necessary\&. See http://www\&.oracle\&.com/technetwork/server\-storage/solaris10/overview/solaris9\-features\-scalability\-135663\&.html\&.
       
  3483 .RE
       
  3484 .sp
       
  3485 .it 1 an-trap
       
  3486 .nr an-no-space-flag 1
       
  3487 .nr an-break-flag 1
       
  3488 .br
       
  3489 .ps +1
       
  3490 \fBLinux\fR
       
  3491 .RS 4
       
  3492 .PP
       
  3493 The 2\&.6 kernel supports large pages\&. Some vendors have backported the code to their 2\&.4\-based releases\&. To check if your system can support large page memory, try the following:
       
  3494 .sp
       
  3495 .if n \{\
       
  3496 .RS 4
       
  3497 .\}
       
  3498 .nf
       
  3499 \fB# cat /proc/meminfo | grep Huge\fR
       
  3500 \fBHugePages_Total: 0\fR
       
  3501 \fBHugePages_Free: 0\fR
       
  3502 \fBHugepagesize: 2048 kB\fR
       
  3503  
       
  3504 .fi
       
  3505 .if n \{\
       
  3506 .RE
       
  3507 .\}
       
  3508 .PP
       
  3509 If the output shows the three "Huge" variables, then your system can support large page memory but it needs to be configured\&. If the command prints nothing, then your system does not support large pages\&. To configure the system to use large page memory, login as
       
  3510 \fBroot\fR, and then follow these steps:
       
  3511 .sp
       
  3512 .RS 4
       
  3513 .ie n \{\
       
  3514 \h'-04' 1.\h'+01'\c
       
  3515 .\}
       
  3516 .el \{\
       
  3517 .sp -1
       
  3518 .IP "  1." 4.2
       
  3519 .\}
       
  3520 If you are using the option
       
  3521 \fB\-XX:+UseSHM\fR
       
  3522 (instead of
       
  3523 \fB\-XX:+UseHugeTLBFS\fR), then increase the
       
  3524 \fBSHMMAX\fR
       
  3525 value\&. It must be larger than the Java heap size\&. On a system with 4 GB of physical RAM (or less), the following will make all the memory sharable:
       
  3526 .sp
       
  3527 .if n \{\
       
  3528 .RS 4
       
  3529 .\}
       
  3530 .nf
       
  3531 \fB# echo 4294967295 > /proc/sys/kernel/shmmax\fR
       
  3532  
       
  3533 .fi
       
  3534 .if n \{\
       
  3535 .RE
       
  3536 .\}
       
  3537 .RE
       
  3538 .sp
       
  3539 .RS 4
       
  3540 .ie n \{\
       
  3541 \h'-04' 2.\h'+01'\c
       
  3542 .\}
       
  3543 .el \{\
       
  3544 .sp -1
       
  3545 .IP "  2." 4.2
       
  3546 .\}
       
  3547 If you are using the option
       
  3548 \fB\-XX:+UseSHM\fR
       
  3549 or
       
  3550 \fB\-XX:+UseHugeTLBFS\fR, then specify the number of large pages\&. In the following example, 3 GB of a 4 GB system are reserved for large pages (assuming a large page size of 2048kB, then 3 GB = 3 * 1024 MB = 3072 MB = 3072 * 1024 kB = 3145728 kB and 3145728 kB / 2048 kB = 1536):
       
  3551 .sp
       
  3552 .if n \{\
       
  3553 .RS 4
       
  3554 .\}
       
  3555 .nf
       
  3556 \fB# echo 1536 > /proc/sys/vm/nr_hugepages\fR
       
  3557  
       
  3558 .fi
       
  3559 .if n \{\
       
  3560 .RE
       
  3561 .\}
       
  3562 .RE
       
  3563 .if n \{\
       
  3564 .sp
       
  3565 .\}
       
  3566 .RS 4
       
  3567 .it 1 an-trap
       
  3568 .nr an-no-space-flag 1
       
  3569 .nr an-break-flag 1
       
  3570 .br
       
  3571 .ps +1
       
  3572 \fBNote\fR
       
  3573 .ps -1
       
  3574 .br
       
  3575 .TS
  4488 .TS
  3576 allbox tab(:);
  4489 tab(@);
  3577 l.
  4490 lw(14.9n) lw(55.1n).
  3578 T{
  4491 T{
  3579 .sp
  4492 Decorations
  3580 .RS 4
  4493 T}@T{
  3581 .ie n \{\
  4494 Description
  3582 \h'-04'\(bu\h'+03'\c
  4495 T}
  3583 .\}
  4496 _
  3584 .el \{\
  4497 T{
  3585 .sp -1
  4498 \f[CB]time\f[R] or \f[CB]t\f[R]
  3586 .IP \(bu 2.3
  4499 T}@T{
  3587 .\}
  4500 Current time and date in ISO\-8601 format.
  3588 Note that the values contained in
  4501 T}
  3589 \fB/proc\fR
  4502 T{
  3590 will reset after you reboot your system, so may want to set them in an initialization script (for example,
  4503 \f[CB]utctime\f[R] or \f[CB]utc\f[R]
  3591 \fBrc\&.local\fR
  4504 T}@T{
  3592 or
  4505 Universal Time Coordinated or Coordinated Universal Time.
  3593 \fBsysctl\&.conf\fR)\&.
  4506 T}
  3594 .RE
  4507 T{
  3595 .sp
  4508 \f[CB]uptime\f[R] or \f[CB]u\f[R]
  3596 .RS 4
  4509 T}@T{
  3597 .ie n \{\
  4510 Time since the start of the JVM in seconds and milliseconds.
  3598 \h'-04'\(bu\h'+03'\c
  4511 For example, 6.567s.
  3599 .\}
  4512 T}
  3600 .el \{\
  4513 T{
  3601 .sp -1
  4514 \f[CB]timemillis\f[R] or \f[CB]tm\f[R]
  3602 .IP \(bu 2.3
  4515 T}@T{
  3603 .\}
  4516 The same value as generated by \f[CB]System.currentTimeMillis()\f[R]
  3604 If you configure (or resize) the OS kernel parameters
  4517 T}
  3605 \fB/proc/sys/kernel/shmmax\fR
  4518 T{
  3606 or
  4519 \f[CB]uptimemillis\f[R] or \f[CB]um\f[R]
  3607 \fB/proc/sys/vm/nr_hugepages\fR, Java processes may allocate large pages for areas in addition to the Java heap\&. These steps can allocate large pages for the following areas:
  4520 T}@T{
  3608 .sp
  4521 Milliseconds since the JVM started.
  3609 .RS 4
  4522 T}
  3610 .ie n \{\
  4523 T{
  3611 \h'-04'\(bu\h'+03'\c
  4524 \f[CB]timenanos\f[R] or \f[CB]tn\f[R]
  3612 .\}
  4525 T}@T{
  3613 .el \{\
  4526 The same value generated by \f[CB]System.nanoTime()\f[R].
  3614 .sp -1
  4527 T}
  3615 .IP \(bu 2.3
  4528 T{
  3616 .\}
  4529 \f[CB]uptimenanos\f[R] or \f[CB]un\f[R]
  3617 Java heap
  4530 T}@T{
  3618 .RE
  4531 Nanoseconds since the JVM started.
  3619 .sp
  4532 T}
  3620 .RS 4
  4533 T{
  3621 .ie n \{\
  4534 \f[CB]hostname\f[R] or \f[CB]hn\f[R]
  3622 \h'-04'\(bu\h'+03'\c
  4535 T}@T{
  3623 .\}
  4536 The host name.
  3624 .el \{\
  4537 T}
  3625 .sp -1
  4538 T{
  3626 .IP \(bu 2.3
  4539 \f[CB]pid\f[R] or \f[CB]p\f[R]
  3627 .\}
  4540 T}@T{
  3628 Code cache
  4541 The process identifier.
  3629 .RE
  4542 T}
  3630 .sp
  4543 T{
  3631 .RS 4
  4544 \f[CB]tid\f[R] or \f[CB]ti\f[R]
  3632 .ie n \{\
  4545 T}@T{
  3633 \h'-04'\(bu\h'+03'\c
  4546 The thread identifier.
  3634 .\}
  4547 T}
  3635 .el \{\
  4548 T{
  3636 .sp -1
  4549 \f[CB]level\f[R] or \f[CB]l\f[R]
  3637 .IP \(bu 2.3
  4550 T}@T{
  3638 .\}
  4551 The level associated with the log message.
  3639 The marking bitmap data structure for the parallel GC
  4552 T}
  3640 .RE
  4553 T{
  3641 .sp
  4554 \f[CB]tags\f[R] or \f[CB]tg\f[R]
  3642 Consequently, if you configure the
  4555 T}@T{
  3643 \fBnr_hugepages\fR
  4556 The tag\-set associated with the log message.
  3644 parameter to the size of the Java heap, then the JVM can fail in allocating the code cache areas on large pages because these areas are quite large in size\&.
       
  3645 .RE
       
  3646 T}
  4557 T}
  3647 .TE
  4558 .TE
  3648 .sp 1
  4559 .SS Convert GC Logging Flags to Xlog
  3649 .sp .5v
  4560 .PP
  3650 .RE
  4561 .TS
  3651 .RE
  4562 tab(@);
  3652 .SH "EXIT STATUS"
  4563 lw(22.4n) lw(16.5n) lw(31.2n).
  3653 .PP
  4564 T{
  3654 The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call
  4565 Legacy Garbage Collection (GC) Flag
  3655 \fBSystem\&.exit(exitValue)\fR\&. The values are:
  4566 T}@T{
  3656 .sp
  4567 Xlog Configuration
       
  4568 T}@T{
       
  4569 Comment
       
  4570 T}
       
  4571 _
       
  4572 T{
       
  4573 \f[CB]G1PrintHeapRegions\f[R]
       
  4574 T}@T{
       
  4575 \f[CB]\-Xlog:gc+region=trace\f[R]
       
  4576 T}@T{
       
  4577 Not Applicable
       
  4578 T}
       
  4579 T{
       
  4580 \f[CB]GCLogFileSize\f[R]
       
  4581 T}@T{
       
  4582 No configuration available
       
  4583 T}@T{
       
  4584 Log rotation is handled by the framework.
       
  4585 T}
       
  4586 T{
       
  4587 \f[CB]NumberOfGCLogFiles\f[R]
       
  4588 T}@T{
       
  4589 Not Applicable
       
  4590 T}@T{
       
  4591 Log rotation is handled by the framework.
       
  4592 T}
       
  4593 T{
       
  4594 \f[CB]PrintAdaptiveSizePolicy\f[R]
       
  4595 T}@T{
       
  4596 \f[CB]\-Xlog:gc+ergo*=\f[R]\f[I]level\f[R]
       
  4597 T}@T{
       
  4598 Use a \f[I]level\f[R] of \f[CB]debug\f[R] for most of the information, or a
       
  4599 \f[I]level\f[R] of \f[CB]trace\f[R] for all of what was logged for
       
  4600 \f[CB]PrintAdaptiveSizePolicy\f[R].
       
  4601 T}
       
  4602 T{
       
  4603 \f[CB]PrintGC\f[R]
       
  4604 T}@T{
       
  4605 \f[CB]\-Xlog:gc\f[R]
       
  4606 T}@T{
       
  4607 Not Applicable
       
  4608 T}
       
  4609 T{
       
  4610 \f[CB]PrintGCApplicationConcurrentTime\f[R]
       
  4611 T}@T{
       
  4612 \f[CB]\-Xlog:safepoint\f[R]
       
  4613 T}@T{
       
  4614 Note that \f[CB]PrintGCApplicationConcurrentTime\f[R] and
       
  4615 \f[CB]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and
       
  4616 aren\[aq]t separated in the new logging.
       
  4617 T}
       
  4618 T{
       
  4619 \f[CB]PrintGCApplicationStoppedTime\f[R]
       
  4620 T}@T{
       
  4621 \f[CB]\-Xlog:safepoint\f[R]
       
  4622 T}@T{
       
  4623 Note that \f[CB]PrintGCApplicationConcurrentTime\f[R] and
       
  4624 \f[CB]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and
       
  4625 not separated in the new logging.
       
  4626 T}
       
  4627 T{
       
  4628 \f[CB]PrintGCCause\f[R]
       
  4629 T}@T{
       
  4630 Not Applicable
       
  4631 T}@T{
       
  4632 GC cause is now always logged.
       
  4633 T}
       
  4634 T{
       
  4635 \f[CB]PrintGCDateStamps\f[R]
       
  4636 T}@T{
       
  4637 Not Applicable
       
  4638 T}@T{
       
  4639 Date stamps are logged by the framework.
       
  4640 T}
       
  4641 T{
       
  4642 \f[CB]PrintGCDetails\f[R]
       
  4643 T}@T{
       
  4644 \f[CB]\-Xlog:gc*\f[R]
       
  4645 T}@T{
       
  4646 Not Applicable
       
  4647 T}
       
  4648 T{
       
  4649 \f[CB]PrintGCID\f[R]
       
  4650 T}@T{
       
  4651 Not Applicable
       
  4652 T}@T{
       
  4653 GC ID is now always logged.
       
  4654 T}
       
  4655 T{
       
  4656 \f[CB]PrintGCTaskTimeStamps\f[R]
       
  4657 T}@T{
       
  4658 \f[CB]\-Xlog:gc+task*=debug\f[R]
       
  4659 T}@T{
       
  4660 Not Applicable
       
  4661 T}
       
  4662 T{
       
  4663 \f[CB]PrintGCTimeStamps\f[R]
       
  4664 T}@T{
       
  4665 Not Applicable
       
  4666 T}@T{
       
  4667 Time stamps are logged by the framework.
       
  4668 T}
       
  4669 T{
       
  4670 \f[CB]PrintHeapAtGC\f[R]
       
  4671 T}@T{
       
  4672 \f[CB]\-Xlog:gc+heap=trace\f[R]
       
  4673 T}@T{
       
  4674 Not Applicable
       
  4675 T}
       
  4676 T{
       
  4677 \f[CB]PrintReferenceGC\f[R]
       
  4678 T}@T{
       
  4679 \f[CB]\-Xlog:gc+ref*=debug\f[R]
       
  4680 T}@T{
       
  4681 Note that in the old logging, \f[CB]PrintReferenceGC\f[R] had an effect
       
  4682 only if \f[CB]PrintGCDetails\f[R] was also enabled.
       
  4683 T}
       
  4684 T{
       
  4685 \f[CB]PrintStringDeduplicationStatistics\f[R]
       
  4686 T}@T{
       
  4687 `\-Xlog:gc+stringdedup*=debug
       
  4688 T}@T{
       
  4689 ` Not Applicable
       
  4690 T}
       
  4691 T{
       
  4692 \f[CB]PrintTenuringDistribution\f[R]
       
  4693 T}@T{
       
  4694 \f[CB]\-Xlog:gc+age*=\f[R]\f[I]level\f[R]
       
  4695 T}@T{
       
  4696 Use a \f[I]level\f[R] of \f[CB]debug\f[R] for the most relevant
       
  4697 information, or a \f[I]level\f[R] of \f[CB]trace\f[R] for all of what was
       
  4698 logged for \f[CB]PrintTenuringDistribution\f[R].
       
  4699 T}
       
  4700 T{
       
  4701 \f[CB]UseGCLogFileRotation\f[R]
       
  4702 T}@T{
       
  4703 Not Applicable
       
  4704 T}@T{
       
  4705 What was logged for \f[CB]PrintTenuringDistribution\f[R].
       
  4706 T}
       
  4707 .TE
       
  4708 .SS Convert Runtime Logging Flags to Xlog
       
  4709 .PP
       
  4710 .TS
       
  4711 tab(@);
       
  4712 lw(15.0n) lw(20.2n) lw(34.7n).
       
  4713 T{
       
  4714 Legacy Runtime Flag
       
  4715 T}@T{
       
  4716 Xlog Configuration
       
  4717 T}@T{
       
  4718 Comment
       
  4719 T}
       
  4720 _
       
  4721 T{
       
  4722 \f[CB]TraceExceptions\f[R]
       
  4723 T}@T{
       
  4724 \f[CB]\-Xlog:exceptions=info\f[R]
       
  4725 T}@T{
       
  4726 Not Applicable
       
  4727 T}
       
  4728 T{
       
  4729 \f[CB]TraceClassLoading\f[R]
       
  4730 T}@T{
       
  4731 \f[CB]\-Xlog:class+load=\f[R]\f[I]level\f[R]
       
  4732 T}@T{
       
  4733 Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or
       
  4734 \f[I]level\f[R]=\f[CB]debug\f[R] for additional information.
       
  4735 In Unified Logging syntax, \f[CB]\-verbose:class\f[R] equals
       
  4736 \f[CB]\-Xlog:class+load=info,class+unload=info\f[R].
       
  4737 T}
       
  4738 T{
       
  4739 \f[CB]TraceClassLoadingPreorder\f[R]
       
  4740 T}@T{
       
  4741 \f[CB]\-Xlog:class+preorder=debug\f[R]
       
  4742 T}@T{
       
  4743 Not Applicable
       
  4744 T}
       
  4745 T{
       
  4746 \f[CB]TraceClassUnloading\f[R]
       
  4747 T}@T{
       
  4748 \f[CB]\-Xlog:class+unload=\f[R]\f[I]level\f[R]
       
  4749 T}@T{
       
  4750 Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or
       
  4751 \f[I]level\f[R]=\f[CB]trace\f[R] for additional information.
       
  4752 In Unified Logging syntax, \f[CB]\-verbose:class\f[R] equals
       
  4753 \f[CB]\-Xlog:class+load=info,class+unload=info\f[R].
       
  4754 T}
       
  4755 T{
       
  4756 \f[CB]VerboseVerification\f[R]
       
  4757 T}@T{
       
  4758 \f[CB]\-Xlog:verification=info\f[R]
       
  4759 T}@T{
       
  4760 Not Applicable
       
  4761 T}
       
  4762 T{
       
  4763 \f[CB]TraceClassPaths\f[R]
       
  4764 T}@T{
       
  4765 \f[CB]\-Xlog:class+path=info\f[R]
       
  4766 T}@T{
       
  4767 Not Applicable
       
  4768 T}
       
  4769 T{
       
  4770 \f[CB]TraceClassResolution\f[R]
       
  4771 T}@T{
       
  4772 \f[CB]\-Xlog:class+resolve=debug\f[R]
       
  4773 T}@T{
       
  4774 Not Applicable
       
  4775 T}
       
  4776 T{
       
  4777 \f[CB]TraceClassInitialization\f[R]
       
  4778 T}@T{
       
  4779 \f[CB]\-Xlog:class+init=info\f[R]
       
  4780 T}@T{
       
  4781 Not Applicable
       
  4782 T}
       
  4783 T{
       
  4784 \f[CB]TraceLoaderConstraints\f[R]
       
  4785 T}@T{
       
  4786 \f[CB]\-Xlog:class+loader+constraints=info\f[R]
       
  4787 T}@T{
       
  4788 Not Applicable
       
  4789 T}
       
  4790 T{
       
  4791 \f[CB]TraceClassLoaderData\f[R]
       
  4792 T}@T{
       
  4793 \f[CB]\-Xlog:class+loader+data=\f[R]\f[I]level\f[R]
       
  4794 T}@T{
       
  4795 Use \f[I]level\f[R]=\f[CB]debug\f[R] for regular information or
       
  4796 \f[I]level\f[R]=\f[CB]trace\f[R] for additional information.
       
  4797 T}
       
  4798 T{
       
  4799 \f[CB]TraceSafepointCleanupTime\f[R]
       
  4800 T}@T{
       
  4801 \f[CB]\-Xlog:safepoint+cleanup=info\f[R]
       
  4802 T}@T{
       
  4803 Not Applicable
       
  4804 T}
       
  4805 T{
       
  4806 \f[CB]TraceSafepoint\f[R]
       
  4807 T}@T{
       
  4808 \f[CB]\-Xlog:safepoint=debug\f[R]
       
  4809 T}@T{
       
  4810 Not Applicable
       
  4811 T}
       
  4812 T{
       
  4813 \f[CB]TraceMonitorInflation\f[R]
       
  4814 T}@T{
       
  4815 \f[CB]\-Xlog:monitorinflation=debug\f[R]
       
  4816 T}@T{
       
  4817 Not Applicable
       
  4818 T}
       
  4819 T{
       
  4820 \f[CB]TraceBiasedLocking\f[R]
       
  4821 T}@T{
       
  4822 \f[CB]\-Xlog:biasedlocking=\f[R]\f[I]level\f[R]
       
  4823 T}@T{
       
  4824 Use \f[I]level\f[R]=\f[CB]info\f[R] for regular information, or
       
  4825 \f[I]level\f[R]=\f[CB]trace\f[R] for additional information.
       
  4826 T}
       
  4827 T{
       
  4828 \f[CB]TraceRedefineClasses\f[R]
       
  4829 T}@T{
       
  4830 \f[CB]\-Xlog:redefine+class*=\f[R]\f[I]level\f[R]
       
  4831 T}@T{
       
  4832 \f[I]level\f[R]=\f[CB]info\f[R], \f[CB]debug\f[R], and \f[CB]trace\f[R] provide
       
  4833 increasing amounts of information.
       
  4834 T}
       
  4835 .TE
       
  4836 .SS \-Xlog Usage Examples
       
  4837 .PP
       
  4838 The following are \f[CB]\-Xlog\f[R] examples.
       
  4839 .TP
       
  4840 .B \f[CB]\-Xlog\f[R]
       
  4841 Logs all messages by using the \f[CB]info\f[R] level to \f[CB]stdout\f[R]
       
  4842 with \f[CB]uptime\f[R], \f[CB]levels\f[R], and \f[CB]tags\f[R] decorations.
       
  4843 This is equivalent to using:
       
  4844 .RS
       
  4845 .RS
       
  4846 .PP
       
  4847 \f[CB]\-Xlog:all=info:stdout:uptime,levels,tags\f[R]
       
  4848 .RE
       
  4849 .RE
       
  4850 .TP
       
  4851 .B \f[CB]\-Xlog:gc\f[R]
       
  4852 Logs messages tagged with the \f[CB]gc\f[R] tag using \f[CB]info\f[R] level
       
  4853 to \f[CB]stdout\f[R].
       
  4854 The default configuration for all other messages at level
       
  4855 \f[CB]warning\f[R] is in effect.
       
  4856 .RS
       
  4857 .RE
       
  4858 .TP
       
  4859 .B \f[CB]\-Xlog:gc,safepoint\f[R]
       
  4860 Logs messages tagged either with the \f[CB]gc\f[R] or \f[CB]safepoint\f[R]
       
  4861 tags, both using the \f[CB]info\f[R] level, to \f[CB]stdout\f[R], with
       
  4862 default decorations.
       
  4863 Messages tagged with both \f[CB]gc\f[R] and \f[CB]safepoint\f[R] won\[aq]t
       
  4864 be logged.
       
  4865 .RS
       
  4866 .RE
       
  4867 .TP
       
  4868 .B \f[CB]\-Xlog:gc+ref=debug\f[R]
       
  4869 Logs messages tagged with both \f[CB]gc\f[R] and \f[CB]ref\f[R] tags, using
       
  4870 the \f[CB]debug\f[R] level to \f[CB]stdout\f[R], with default decorations.
       
  4871 Messages tagged only with one of the two tags won\[aq]t be logged.
       
  4872 .RS
       
  4873 .RE
       
  4874 .TP
       
  4875 .B \f[CB]\-Xlog:gc=debug:file=gc.txt:none\f[R]
       
  4876 Logs messages tagged with the \f[CB]gc\f[R] tag using the \f[CB]debug\f[R]
       
  4877 level to a file called \f[CB]gc.txt\f[R] with no decorations.
       
  4878 The default configuration for all other messages at level
       
  4879 \f[CB]warning\f[R] is still in effect.
       
  4880 .RS
       
  4881 .RE
       
  4882 .TP
       
  4883 .B \f[CB]\-Xlog:gc=trace:file=gctrace.txt:uptimemillis,pids:filecount=5,filesize=1024\f[R]
       
  4884 Logs messages tagged with the \f[CB]gc\f[R] tag using the \f[CB]trace\f[R]
       
  4885 level to a rotating file set with 5 files with size 1 MB with the base
       
  4886 name \f[CB]gctrace.txt\f[R] and uses decorations \f[CB]uptimemillis\f[R] and
       
  4887 \f[CB]pid\f[R].
       
  4888 .RS
       
  4889 .PP
       
  4890 The default configuration for all other messages at level
       
  4891 \f[CB]warning\f[R] is still in effect.
       
  4892 .RE
       
  4893 .TP
       
  4894 .B \f[CB]\-Xlog:gc::uptime,tid\f[R]
       
  4895 Logs messages tagged with the \f[CB]gc\f[R] tag using the default
       
  4896 \[aq]info\[aq] level to default the output \f[CB]stdout\f[R] and uses
       
  4897 decorations \f[CB]uptime\f[R] and \f[CB]tid\f[R].
       
  4898 The default configuration for all other messages at level
       
  4899 \f[CB]warning\f[R] is still in effect.
       
  4900 .RS
       
  4901 .RE
       
  4902 .TP
       
  4903 .B \f[CB]\-Xlog:gc*=info,safepoint*=off\f[R]
       
  4904 Logs messages tagged with at least \f[CB]gc\f[R] using the \f[CB]info\f[R]
       
  4905 level, but turns off logging of messages tagged with \f[CB]safepoint\f[R].
       
  4906 Messages tagged with both \f[CB]gc\f[R] and \f[CB]safepoint\f[R] won\[aq]t
       
  4907 be logged.
       
  4908 .RS
       
  4909 .RE
       
  4910 .TP
       
  4911 .B \f[CB]\-Xlog:disable\ \-Xlog:safepoint=trace:safepointtrace.txt\f[R]
       
  4912 Turns off all logging, including warnings and errors, and then enables
       
  4913 messages tagged with \f[CB]safepoint\f[R]using \f[CB]trace\f[R]level to the
       
  4914 file \f[CB]safepointtrace.txt\f[R].
       
  4915 The default configuration doesn\[aq]t apply, because the command line
       
  4916 started with \f[CB]\-Xlog:disable\f[R].
       
  4917 .RS
       
  4918 .RE
       
  4919 .SS Complex \-Xlog Usage Examples
       
  4920 .PP
       
  4921 The following describes a few complex examples of using the
       
  4922 \f[CB]\-Xlog\f[R] option.
       
  4923 .TP
       
  4924 .B \f[CB]\-Xlog:gc+class*=debug\f[R]
       
  4925 Logs messages tagged with at least \f[CB]gc\f[R] and \f[CB]class\f[R] tags
       
  4926 using the \f[CB]debug\f[R] level to \f[CB]stdout\f[R].
       
  4927 The default configuration for all other messages at the level
       
  4928 \f[CB]warning\f[R] is still in effect
       
  4929 .RS
       
  4930 .RE
       
  4931 .TP
       
  4932 .B \f[CB]\-Xlog:gc+meta*=trace,class*=off:file=gcmetatrace.txt\f[R]
       
  4933 Logs messages tagged with at least the \f[CB]gc\f[R] and \f[CB]meta\f[R]
       
  4934 tags using the \f[CB]trace\f[R] level to the file \f[CB]metatrace.txt\f[R]
       
  4935 but turns off all messages tagged with \f[CB]class\f[R].
       
  4936 Messages tagged with \f[CB]gc\f[R], \f[CB]meta\f[R], and \f[CB]class\f[R]
       
  4937 aren\[aq]t be logged as \f[CB]class*\f[R] is set to off.
       
  4938 The default configuration for all other messages at level
       
  4939 \f[CB]warning\f[R] is in effect except for those that include
       
  4940 \f[CB]class\f[R].
       
  4941 .RS
       
  4942 .RE
       
  4943 .TP
       
  4944 .B \f[CB]\-Xlog:gc+meta=trace\f[R]
       
  4945 Logs messages tagged with exactly the \f[CB]gc\f[R] and \f[CB]meta\f[R] tags
       
  4946 using the \f[CB]trace\f[R] level to \f[CB]stdout\f[R].
       
  4947 The default configuration for all other messages at level
       
  4948 \f[CB]warning\f[R] is still be in effect.
       
  4949 .RS
       
  4950 .RE
       
  4951 .TP
       
  4952 .B \f[CB]\-Xlog:gc+class+heap*=debug,meta*=warning,threads*=off\f[R]
       
  4953 Logs messages tagged with at least \f[CB]gc\f[R], \f[CB]class\f[R], and
       
  4954 \f[CB]heap\f[R] tags using the \f[CB]trace\f[R] level to \f[CB]stdout\f[R] but
       
  4955 only log messages tagged with \f[CB]meta\f[R] with level.
       
  4956 The default configuration for all other messages at the level
       
  4957 \f[CB]warning\f[R] is in effect except for those that include
       
  4958 \f[CB]threads\f[R].
       
  4959 .RS
       
  4960 .RE
       
  4961 .SH VALIDATE JAVA VIRTUAL MACHINE FLAG ARGUMENTS
       
  4962 .PP
       
  4963 You use values provided to all Java Virtual Machine (JVM) command\-line
       
  4964 flags for validation and, if the input value is invalid or
       
  4965 out\-of\-range, then an appropriate error message is displayed.
       
  4966 .PP
       
  4967 Whether they\[aq]re set ergonomically, in a command line, by an input
       
  4968 tool, or through the APIs (for example, classes contained in the package
       
  4969 \f[CB]java.lang.management\f[R]) the values provided to all Java Virtual
       
  4970 Machine (JVM) command\-line flags are validated.
       
  4971 Ergonomics are described in Java Platform, Standard Edition HotSpot
       
  4972 Virtual Machine Garbage Collection Tuning Guide.
       
  4973 .PP
       
  4974 Range and constraints are validated either when all flags have their
       
  4975 values set during JVM initialization or a flag\[aq]s value is changed
       
  4976 during runtime (for example using the \f[CB]jcmd\f[R] tool).
       
  4977 The JVM is terminated if a value violates either the range or constraint
       
  4978 check and an appropriate error message is printed on the error stream.
       
  4979 .PP
       
  4980 For example, if a flag violates a range or a constraint check, then the
       
  4981 JVM exits with an error:
       
  4982 .IP
       
  4983 .nf
       
  4984 \f[CB]
       
  4985 java\ \-XX:AllocatePrefetchStyle=5\ \-version\ \ \ 
       
  4986 intx\ AllocatePrefetchStyle=5\ is\ outside\ the\ allowed\ range\ [\ 0\ ...\ 3\ ]\ \ \ 
       
  4987 Improperly\ specified\ VM\ option\ \[aq]AllocatePrefetchStyle=5\[aq]\ \ \ 
       
  4988 Error:\ Could\ not\ create\ the\ Java\ Virtual\ Machine.\ \ 
       
  4989 Error:\ A\ fatal\ exception\ has\ occurred.\ Program\ will\ exit.
       
  4990 \f[R]
       
  4991 .fi
       
  4992 .PP
       
  4993 The flag \f[CB]\-XX:+PrintFlagsRanges\f[R] prints the range of all the
       
  4994 flags.
       
  4995 This flag allows automatic testing of the flags by the values provided
       
  4996 by the ranges.
       
  4997 For the flags that have the ranges specified, the type, name, and the
       
  4998 actual range is printed in the output.
       
  4999 .PP
       
  5000 For example,
       
  5001 .IP
       
  5002 .nf
       
  5003 \f[CB]
       
  5004 intx\ \ \ ThreadStackSize\ [\ 0\ ...\ 9007199254740987\ ]\ {pd\ product}
       
  5005 \f[R]
       
  5006 .fi
       
  5007 .PP
       
  5008 For the flags that don\[aq]t have the range specified, the values
       
  5009 aren\[aq]t displayed in the print out.
       
  5010 For example:
       
  5011 .IP
       
  5012 .nf
       
  5013 \f[CB]
       
  5014 size_t\ NewSize\ \ \ \ \ \ \ \ \ [\ \ \ ...\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\ {product}
       
  5015 \f[R]
       
  5016 .fi
       
  5017 .PP
       
  5018 This helps to identify the flags that need to be implemented.
       
  5019 The automatic testing framework can skip those flags that don\[aq]t have
       
  5020 values and aren\[aq]t implemented.
       
  5021 .SH LARGE PAGES
       
  5022 .PP
       
  5023 You use large pages, also known as huge pages, as memory pages that are
       
  5024 significantly larger than the standard memory page size (which varies
       
  5025 depending on the processor and operating system).
       
  5026 Large pages optimize processor Translation\-Lookaside Buffers.
       
  5027 .PP
       
  5028 A Translation\-Lookaside Buffer (TLB) is a page translation cache that
       
  5029 holds the most\-recently used virtual\-to\-physical address
       
  5030 translations.
       
  5031 A TLB is a scarce system resource.
       
  5032 A TLB miss can be costly because the processor must then read from the
       
  5033 hierarchical page table, which may require multiple memory accesses.
       
  5034 By using a larger memory page size, a single TLB entry can represent a
       
  5035 larger memory range.
       
  5036 This results in less pressure on a TLB, and memory\-intensive
       
  5037 applications may have better performance.
       
  5038 .PP
       
  5039 However, large pages page memory can negatively affect system
       
  5040 performance.
       
  5041 For example, when a large mount of memory is pinned by an application,
       
  5042 it may create a shortage of regular memory and cause excessive paging in
       
  5043 other applications and slow down the entire system.
       
  5044 Also, a system that has been up for a long time could produce excessive
       
  5045 fragmentation, which could make it impossible to reserve enough large
       
  5046 page memory.
       
  5047 When this happens, either the OS or JVM reverts to using regular pages.
       
  5048 .PP
       
  5049 Oracle Solaris, Linux, and Windows support large pages.
       
  5050 .SS Large Pages Support for Oracle Solaris
       
  5051 .PP
       
  5052 Oracle Solaris includes Multiple Page Size Support (MPSS).
       
  5053 No additional configuration is necessary.
       
  5054 .SS Large Pages Support for Linux
       
  5055 .PP
       
  5056 The 2.6 kernel supports large pages.
       
  5057 Some vendors have backported the code to their 2.4\-based releases.
       
  5058 To check if your system can support large page memory, try the
       
  5059 following:
       
  5060 .IP
       
  5061 .nf
       
  5062 \f[CB]
       
  5063 #\ cat\ /proc/meminfo\ |\ grep\ Huge
       
  5064 HugePages_Total:\ 0
       
  5065 HugePages_Free:\ 0
       
  5066 Hugepagesize:\ 2048\ kB
       
  5067 \f[R]
       
  5068 .fi
       
  5069 .PP
       
  5070 If the output shows the three "Huge" variables, then your system can
       
  5071 support large page memory but it needs to be configured.
       
  5072 If the command prints nothing, then your system doesn\[aq]t support
       
  5073 large pages.
       
  5074 To configure the system to use large page memory, login as
       
  5075 \f[CB]root\f[R], and then follow these steps:
       
  5076 .IP "1." 3
       
  5077 If you\[aq]re using the option \f[CB]\-XX:+UseSHM\f[R] (instead of
       
  5078 \f[CB]\-XX:+UseHugeTLBFS\f[R]), then increase the \f[CB]SHMMAX\f[R] value.
       
  5079 It must be larger than the Java heap size.
       
  5080 On a system with 4 GB of physical RAM (or less), the following makes all
       
  5081 the memory sharable:
  3657 .RS 4
  5082 .RS 4
  3658 .ie n \{\
  5083 .RS
  3659 \h'-04'\(bu\h'+03'\c
  5084 .PP
  3660 .\}
  5085 \f[CB]#\ echo\ 4294967295\ >\ /proc/sys/kernel/shmmax\f[R]
  3661 .el \{\
  5086 .RE
  3662 .sp -1
  5087 .RE
  3663 .IP \(bu 2.3
  5088 .IP "2." 3
  3664 .\}
  5089 If you\[aq]re using the option \f[CB]\-XX:+UseSHM\f[R] or
  3665 \fB0\fR: Successful completion
  5090 \f[CB]\-XX:+UseHugeTLBFS\f[R], then specify the number of large pages.
  3666 .RE
  5091 In the following example, 3 GB of a 4 GB system are reserved for large
  3667 .sp
  5092 pages (assuming a large page size of 2048kB, then 3 GB = 3 * 1024 MB =
       
  5093 3072 MB = 3072 * 1024 kB = 3145728 kB and 3145728 kB / 2048 kB = 1536):
  3668 .RS 4
  5094 .RS 4
  3669 .ie n \{\
  5095 .RS
  3670 \h'-04'\(bu\h'+03'\c
  5096 .PP
  3671 .\}
  5097 \f[CB]#\ echo\ 1536\ >\ /proc/sys/vm/nr_hugepages\f[R]
  3672 .el \{\
  5098 .RE
  3673 .sp -1
  5099 .RS
  3674 .IP \(bu 2.3
  5100 .PP
  3675 .\}
  5101 \f[B]Note:\f[R] The values contained in \f[CB]/proc\f[R] resets after you
  3676 \fB>0\fR: An error occurred
  5102 reboot your system, so may want to set them in an initialization script
  3677 .RE
  5103 (for example, \f[CB]rc.local\f[R] or \f[CB]sysctl.conf\f[R]).
  3678 .SH "SEE ALSO"
  5104 .RE
  3679 .sp
  5105 .RE
       
  5106 .IP \[bu] 2
       
  5107 If you configure (or resize) the OS kernel parameters
       
  5108 \f[CB]/proc/sys/kernel/shmmax\f[R] or \f[CB]/proc/sys/vm/nr_hugepages\f[R],
       
  5109 Java processes may allocate large pages for areas in addition to the
       
  5110 Java heap.
       
  5111 These steps can allocate large pages for the following areas:
       
  5112 .RS 2
       
  5113 .IP \[bu] 2
       
  5114 Java heap
       
  5115 .IP \[bu] 2
       
  5116 Code cache
       
  5117 .IP \[bu] 2
       
  5118 The marking bitmap data structure for the parallel GC
       
  5119 .PP
       
  5120 Consequently, if you configure the \f[CB]nr_hugepages\f[R] parameter to
       
  5121 the size of the Java heap, then the JVM can fail in allocating the code
       
  5122 cache areas on large pages because these areas are quite large in size.
       
  5123 .RE
       
  5124 .SS Large Pages Support for Windows
       
  5125 .PP
       
  5126 To use large pages support on Windows, the administrator must first
       
  5127 assign additional privileges to the user who is running the application:
       
  5128 .IP "1." 3
       
  5129 Select \f[B]Control Panel\f[R], \f[B]Administrative Tools\f[R], and then
       
  5130 \f[B]Local Security Policy\f[R].
       
  5131 .IP "2." 3
       
  5132 Select \f[B]Local Policies\f[R] and then \f[B]User Rights Assignment\f[R].
       
  5133 .IP "3." 3
       
  5134 Double\-click \f[B]Lock pages in memory\f[R], then add users and/or
       
  5135 groups.
       
  5136 .IP "4." 3
       
  5137 Reboot your system.
       
  5138 .PP
       
  5139 Note that these steps are required even if it\[aq]s the administrator
       
  5140 who\[aq]s running the application, because administrators by default
       
  5141 don\[aq]t have the privilege to lock pages in memory.
       
  5142 .SH APPLICATION CLASS DATA SHARING
       
  5143 .PP
       
  5144 Application Class Data Sharing (AppCDS) extends class data sharing (CDS)
       
  5145 to enable application classes to be placed in a shared archive.
       
  5146 .PP
       
  5147 In addition to the core library classes, AppCDS supports \f[B]Class Data
       
  5148 Sharing\f[R]
       
  5149 [https://docs.oracle.com/en/java/javase/12/vm/class\-data\-sharing.html#GUID\-7EAA3411\-8CF0\-4D19\-BD05\-DF5E1780AA91]
       
  5150 from the following locations:
       
  5151 .IP \[bu] 2
       
  5152 Platform classes from the runtime image
       
  5153 .IP \[bu] 2
       
  5154 Application classes from the runtime image
       
  5155 .IP \[bu] 2
       
  5156 Application classes from the class path
       
  5157 .IP \[bu] 2
       
  5158 Application classes from the module path
       
  5159 .PP
       
  5160 Archiving application classes provides better start up time at runtime.
       
  5161 When running multiple JVM processes, AppCDS also reduces the runtime
       
  5162 footprint with memory sharing for read\-only metadata.
       
  5163 .PP
       
  5164 CDS/AppCDS supports archiving classes from JAR files only.
       
  5165 .PP
       
  5166 Prior to JDK 11, a non\-empty directory was reported as a fatal error in
       
  5167 the following conditions:
       
  5168 .IP \[bu] 2
       
  5169 For base CDS, a non\-empty directory cannot exist in the
       
  5170 \f[CB]\-Xbootclasspath/a\f[R] path
       
  5171 .IP \[bu] 2
       
  5172 With \f[CB]\-XX:+UseAppCDS\f[R], a non\-empty directory could not exist in
       
  5173 the \f[CB]\-Xbootclasspath/a\f[R] path, class path, and module path.
       
  5174 .PP
       
  5175 In JDK 11 and later, \f[CB]\-XX:+UseAppCDS\f[R] is obsolete and the
       
  5176 behavior for a non\-empty directory is based on the class types in the
       
  5177 classlist.
       
  5178 A non\-empty directory is reported as a fatal error in the following
       
  5179 conditions:
       
  5180 .IP \[bu] 2
       
  5181 If application classes or platform classes are not loaded, dump time
       
  5182 only reports an error if a non\-empty directory exists in
       
  5183 \f[CB]\-Xbootclasspath/a\f[R] path
       
  5184 .IP \[bu] 2
       
  5185 If application classes or platform classes are loaded, dump time reports
       
  5186 an error for a non\-empty directory that exists in
       
  5187 \f[CB]\-Xbootclasspath/a\f[R] path, class path, or module path
       
  5188 .PP
       
  5189 In JDK 11 and later, using
       
  5190 \f[CB]\-XX:DumpLoadedClassList=\f[R]\f[I]class_list_file\f[R] results a
       
  5191 generated classlist with all classes (both system library classes and
       
  5192 application classes) included.
       
  5193 You no longer have to specify \f[CB]\-XX:+UseAppCDS\f[R] with
       
  5194 \f[CB]\-XX:DumpLoadedClassList\f[R] to produce a complete class list.
       
  5195 .PP
       
  5196 In JDK 11 and later, because \f[CB]UseAppCDS\f[R] is obsolete,
       
  5197 \f[CB]SharedArchiveFile\f[R] becomes a product flag by default.
       
  5198 Specifying \f[CB]+UnlockDiagnosticVMOptions\f[R] for
       
  5199 \f[CB]SharedArchiveFile\f[R] is no longer needed in any configuration.
       
  5200 .PP
       
  5201 Class Data Sharing (CDS)/AppCDS does not support archiving array classes
       
  5202 in a class list.
       
  5203 When an array in the class list is encountered, CDS dump time gives the
       
  5204 explicit error message:
       
  5205 .RS
       
  5206 .PP
       
  5207 \f[CB]Preload\ Warning:\ Cannot\ find\f[R] \f[I]array_name\f[R]
       
  5208 .RE
       
  5209 .PP
       
  5210 Although an array in the class list is not allowed, some array classes
       
  5211 can still be created at CDS/AppCDS dump time.
       
  5212 Those arrays are created during the execution of the Java code used by
       
  5213 the Java class loaders (\f[CB]PlatformClassLoader\f[R] and the system
       
  5214 class loader) to load classes at dump time.
       
  5215 The created arrays are archived with the rest of the loaded classes.
       
  5216 .SS Extending Class Data Sharing to Support the Module Path
       
  5217 .PP
       
  5218 In JDK 11, Class Data Sharing (CDS) has been improved to support
       
  5219 archiving classes from the module path.
       
  5220 .IP \[bu] 2
       
  5221 To create a CDS archive using the \f[CB]\-\-module\-path\f[R] VM option,
       
  5222 use the following command line syntax:
       
  5223 .RS 2
       
  5224 .RS
       
  5225 .PP
       
  5226 \f[CB]java\ \-Xshare:dump\ \-XX:SharedClassListFile=\f[R]\f[I]class_list_file\f[R]
       
  5227 \f[CB]\-XX:SharedArchiveFile=\f[R]\f[I]shared_archive_file\f[R]
       
  5228 \f[CB]\-\-module\-path=\f[R]\f[I]path_to_modular_jar\f[R] \f[CB]\-m\f[R]
       
  5229 \f[I]module_name\f[R]
       
  5230 .RE
       
  5231 .RE
       
  5232 .IP \[bu] 2
       
  5233 To run with a CDS archive using the \f[CB]\-\-module\-path\f[R] VM option,
       
  5234 use the following the command line syntax:
       
  5235 .RS 2
       
  5236 .RS
       
  5237 .PP
       
  5238 \f[CB]java\ \-XX:SharedArchiveFile=\f[R]\f[I]shared_archive_file\f[R]
       
  5239 \f[CB]\-\-module\-path=\f[R]\f[I]path_to_modular_jar\f[R] \f[CB]\-m\f[R]
       
  5240 \f[I]module_name\f[R]
       
  5241 .RE
       
  5242 .RE
       
  5243 .PP
       
  5244 The following table describes how the VM options related to module paths
       
  5245 can be used along with the \f[CB]\-Xshare\f[R] option.
       
  5246 .PP
       
  5247 .TS
       
  5248 tab(@);
       
  5249 l l l.
       
  5250 T{
       
  5251 Option
       
  5252 T}@T{
       
  5253 \-Xshare:dump
       
  5254 T}@T{
       
  5255 \-Xshare:{on,auto}
       
  5256 T}
       
  5257 _
       
  5258 T{
       
  5259 \f[CB]\-\-module\-path\f[R][1] \f[I]mp\f[R]
       
  5260 T}@T{
       
  5261 Allowed
       
  5262 T}@T{
       
  5263 Allowed[2]
       
  5264 T}
       
  5265 T{
       
  5266 \f[CB]\-\-module\f[R]
       
  5267 T}@T{
       
  5268 Allowed
       
  5269 T}@T{
       
  5270 Allowed
       
  5271 T}
       
  5272 T{
       
  5273 \f[CB]\-\-add\-module\f[R]
       
  5274 T}@T{
       
  5275 Allowed
       
  5276 T}@T{
       
  5277 Allowed
       
  5278 T}
       
  5279 T{
       
  5280 \f[CB]\-\-upgrade\-module\-path\f[R][3]
       
  5281 T}@T{
       
  5282 Disallowed (exits if specified)
       
  5283 T}@T{
       
  5284 Allowed (disables CDS)
       
  5285 T}
       
  5286 T{
       
  5287 \f[CB]\-\-patch\-module\f[R][4]
       
  5288 T}@T{
       
  5289 Disallowed (exits if specified)
       
  5290 T}@T{
       
  5291 Allowed (disables CDS)
       
  5292 T}
       
  5293 T{
       
  5294 \f[CB]\-\-limit\-modules\f[R][5]
       
  5295 T}@T{
       
  5296 Disallowed (exits if specified)
       
  5297 T}@T{
       
  5298 Allowed (disables CDS)
       
  5299 T}
       
  5300 .TE
       
  5301 .PP
       
  5302 [1] Although there are two ways of specifying a module in a
       
  5303 \f[CB]\-\-module\-path\f[R], that is, modular JAR or exploded module, only
       
  5304 modular JARs are supported.
       
  5305 .PP
       
  5306 [2] Different \f[I]mp\f[R] can be specified during dump time versus run
       
  5307 time.
       
  5308 If an archived class K was loaded from \f[CB]mp1.jar\f[R] at dump time,
       
  5309 but changes in \f[I]mp\f[R] cause it to be available from a different
       
  5310 \f[CB]mp2.jar\f[R] at run time, then the archived version of K will be
       
  5311 disregarded at run time; K will be loaded dynamically.
       
  5312 .PP
       
  5313 [3] Currently, only two system modules are upgradeable
       
  5314 (\f[CB]java.compiler\f[R] and \f[CB]jdk.internal.vm.compiler\f[R]).
       
  5315 However, these modules are seldom upgraded in production software.
       
  5316 .PP
       
  5317 [4] As documented in JEP 261, using \f[CB]\-\-patch\-module\f[R] is
       
  5318 strongly discouraged for production use.
       
  5319 .PP
       
  5320 [5] \f[CB]\-\-limit\-modules\f[R] is intended for testing purposes.
       
  5321 It is seldom used in production software.
       
  5322 .PP
       
  5323 If \f[CB]\-\-upgrade\-module\-path\f[R], \f[CB]\-\-patch\-module\f[R], or
       
  5324 \f[CB]\-\-limit\-modules\f[R] is specified at dump time, an error will be
       
  5325 printed and the JVM will exit.
       
  5326 For example, if the \f[CB]\-\-limit\-modules\f[R] option is specified at
       
  5327 dump time, the user will see the following error:
       
  5328 .IP
       
  5329 .nf
       
  5330 \f[CB]
       
  5331 Error\ occurred\ during\ initialization\ of\ VM
       
  5332 Cannot\ use\ the\ following\ option\ when\ dumping\ the\ shared\ archive:\ \-\-limit\-modules
       
  5333 \f[R]
       
  5334 .fi
       
  5335 .PP
       
  5336 If \f[CB]\-\-upgrade\-module\-path\f[R], \f[CB]\-\-patch\-module\f[R], or
       
  5337 \f[CB]\-\-limit\-modules\f[R] is specified at run time, a warning message
       
  5338 will be printed indicating that CDS is disabled.
       
  5339 For example, if the \f[CB]\-\-limit\-modules\f[R] options is specified at
       
  5340 run time, the user will see the following warning:
       
  5341 .IP
       
  5342 .nf
       
  5343 \f[CB]
       
  5344 Java\ HotSpot(TM)\ 64\-Bit\ Server\ VM\ warning:\ CDS\ is\ disabled\ when\ the\ \-\-limit\-modules\ option\ is\ specified.
       
  5345 \f[R]
       
  5346 .fi
       
  5347 .PP
       
  5348 Several other noteworthy things include:
       
  5349 .IP \[bu] 2
       
  5350 Any valid combinations of \f[CB]\-cp\f[R] and \f[CB]\-\-module\-path\f[R]
       
  5351 are supported.
       
  5352 .IP \[bu] 2
       
  5353 A non\-empty directory in the module path causes a fatal error.
       
  5354 The user will see the following error messages:
       
  5355 .RS 2
       
  5356 .IP
       
  5357 .nf
       
  5358 \f[CB]
       
  5359 Error:\ non\-empty\ directory\ <directory>\ Hint:\ enable\ \-Xlog:class+path=info\ to\ diagnose\ the\ failure\ Error\ occurred\ during\ initialization\ of\ VM\ Cannot\ have\ non\-empty\ directory\ in\ paths
       
  5360 \f[R]
       
  5361 .fi
       
  5362 .RE
       
  5363 .IP \[bu] 2
       
  5364 Unlike the class path, there\[aq]s no restriction that the module path
       
  5365 at dump time must be equal to or be a prefix of the module path at run
       
  5366 time.
       
  5367 .IP \[bu] 2
       
  5368 The archive is invalidated if an existing JAR in the module path is
       
  5369 updated after archive generation.
       
  5370 .IP \[bu] 2
       
  5371 Removing a JAR from the module path does not invalidate the shared
       
  5372 archive.
       
  5373 Archived classes from the removed JAR are not used at runtime.
       
  5374 .SS Dynamic CDS archive
       
  5375 .PP
       
  5376 Dynamic CDS archive extends AppCDS to allow archiving of classes when a
       
  5377 Java application exits.
       
  5378 It improves the usability of AppCDS by eliminating the trial run step
       
  5379 for creating a class list for each application.
       
  5380 The archived classes include all loaded application classes and library
       
  5381 classes that are not present in the default CDS archive which is
       
  5382 included in the JDK.
       
  5383 .PP
       
  5384 A base archive is required when creating a dynamic archive.
       
  5385 If the base archive is not specified, the default CDS archive is used as
       
  5386 the base archive.
       
  5387 .PP
       
  5388 To create a dynamic CDS archive with the default CDS archive as the base
       
  5389 archive, just add the
       
  5390 \f[CB]\-XX:ArchiveClassesAtExit=<dynamic\ archive>\f[R] option to the
       
  5391 command line for running the Java application.
       
  5392 .PP
       
  5393 If the default CDS archive does not exist, the VM will exit with the
       
  5394 following error:
       
  5395 .IP
       
  5396 .nf
       
  5397 \f[CB]
       
  5398 ArchiveClassesAtExit\ not\ supported\ when\ base\ CDS\ archive\ is\ not\ loaded
       
  5399 \f[R]
       
  5400 .fi
       
  5401 .PP
       
  5402 To run the Java application using a dynamic CDS archive, just add the
       
  5403 \f[CB]\-XX:SharedArchiveFile=<dynamic\ archive>\f[R] option to the command
       
  5404 line for running the Java application.
       
  5405 .PP
       
  5406 The base archive is not required to be specified in the command line.
       
  5407 The base archive information, including its name and full path, will be
       
  5408 retrieved from the dynamic archive header.
       
  5409 Note that the user could also use the \f[CB]\-XX:SharedArchiveFile\f[R]
       
  5410 option for specifying a regular AppCDS archive.
       
  5411 Therefore, the specified archive in the \f[CB]\-XX:SharedArchiveFile\f[R]
       
  5412 option could be either a regular or dynamic archive.
       
  5413 During VM start up the specified archive header will be read.
       
  5414 If \f[CB]\-XX:SharedArchiveFile\f[R] refers to a regular archive, then the
       
  5415 behavior will be unchanged.
       
  5416 If \f[CB]\-XX:SharedArchiveFile\f[R] refers to a dynamic archive, the VM
       
  5417 will retrieve the base archive location from the dynamic archive.
       
  5418 If the dynamic archive was created with the default CDS archive, then
       
  5419 the current default CDS archive will be used, and will be found relative
       
  5420 to the current run time environment.
       
  5421 .PP
       
  5422 Please refer to \f[B]JDK\-8221706\f[R]
       
  5423 [https://bugs.openjdk.java.net/browse/JDK\-8221706] for details on error
       
  5424 checking during dynamic CDS archive dump time and run time.
       
  5425 .SS Creating a Shared Archive File and Using It to Run an Application
       
  5426 .SS AppCDS archive
       
  5427 .PP
       
  5428 The following steps create a shared archive file that contains all the
       
  5429 classes used by the \f[CB]test.Hello\f[R] application.
       
  5430 The last step runs the application with the shared archive file.
       
  5431 .IP "1." 3
       
  5432 Create a list of all classes used by the \f[CB]test.Hello\f[R]
       
  5433 application.
       
  5434 The following command creates a file named \f[CB]hello.classlist\f[R] that
       
  5435 contains a list of all classes used by this application:
  3680 .RS 4
  5436 .RS 4
  3681 .ie n \{\
  5437 .RS
  3682 \h'-04'\(bu\h'+03'\c
  5438 .PP
  3683 .\}
  5439 \f[CB]java\ \-Xshare:off\ \-XX:DumpLoadedClassList=hello.classlist\ \-cp\ hello.jar\ test.Hello\f[R]
  3684 .el \{\
  5440 .RE
  3685 .sp -1
  5441 .PP
  3686 .IP \(bu 2.3
  5442 Note that the classpath specified by the \f[CB]\-cp\f[R] parameter must
  3687 .\}
  5443 contain only JAR files.
  3688 javac(1)
  5444 .RE
  3689 .RE
  5445 .IP "2." 3
  3690 .sp
  5446 Create a shared archive, named \f[CB]hello.jsa\f[R], that contains all the
       
  5447 classes in \f[CB]hello.classlist\f[R]:
  3691 .RS 4
  5448 .RS 4
  3692 .ie n \{\
  5449 .RS
  3693 \h'-04'\(bu\h'+03'\c
  5450 .PP
  3694 .\}
  5451 \f[CB]java\ \-Xshare:dump\ \-XX:SharedArchiveFile=hello.jsa\ \-XX:SharedClassListFile=hello.classlist\ \-cp\ hello.jar\f[R]
  3695 .el \{\
  5452 .RE
  3696 .sp -1
  5453 .PP
  3697 .IP \(bu 2.3
  5454 Note that the classpath used at archive creation time must be the same
  3698 .\}
  5455 as (or a prefix of) the classpath used at run time.
  3699 jdb(1)
  5456 .RE
  3700 .RE
  5457 .IP "3." 3
  3701 .sp
  5458 Run the application \f[CB]test.Hello\f[R] with the shared archive
       
  5459 \f[CB]hello.jsa\f[R]:
  3702 .RS 4
  5460 .RS 4
  3703 .ie n \{\
  5461 .RS
  3704 \h'-04'\(bu\h'+03'\c
  5462 .PP
  3705 .\}
  5463 \f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ test.Hello\f[R]
  3706 .el \{\
  5464 .RE
  3707 .sp -1
  5465 .RE
  3708 .IP \(bu 2.3
  5466 .IP "4." 3
  3709 .\}
  5467 \f[B]Optional\f[R] Verify that the \f[CB]test.Hello\f[R] application is
  3710 jar(1)
  5468 using the class contained in the \f[CB]hello.jsa\f[R] shared archive:
  3711 .RE
       
  3712 .sp
       
  3713 .RS 4
  5469 .RS 4
  3714 .ie n \{\
  5470 .RS
  3715 \h'-04'\(bu\h'+03'\c
  5471 .PP
  3716 .\}
  5472 \f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ \-verbose:class\ test.Hello\f[R]
  3717 .el \{\
  5473 .RE
  3718 .sp -1
  5474 .PP
  3719 .IP \(bu 2.3
  5475 The output of this command should contain the following text:
  3720 .\}
  5476 .IP
  3721 jstat(1)
  5477 .nf
  3722 .RE
  5478 \f[CB]
  3723 .br
  5479 Loaded\ test.Hello\ from\ shared\ objects\ file\ by\ sun/misc/Launcher$AppClassLoader
  3724 'pl 8.5i
  5480 \f[R]
  3725 'bp
  5481 .fi
       
  5482 .RE
       
  5483 .SS Dynamic CDS archive
       
  5484 .PP
       
  5485 The following steps create a dynamic CDS archive file that contains the
       
  5486 classes used by the \f[CB]test.Hello\f[R] application and are not included
       
  5487 in the default CDS archive.
       
  5488 The second step runs the application with the dynamic CDS archive.
       
  5489 .IP "1." 3
       
  5490 Create a dynamic CDS archive, named \f[CB]hello.jsa\f[R], that contains
       
  5491 all the classes in \f[CB]hello.jar\f[R] loaded by the application
       
  5492 \f[CB]test.Hello\f[R]:
       
  5493 .RS 4
       
  5494 .RS
       
  5495 .PP
       
  5496 \f[CB]java\ \-XX:ArchiveClassesAtExit=hello.jsa\ \-cp\ hello.jar\ Hello\f[R]
       
  5497 .RE
       
  5498 .PP
       
  5499 Note that the classpath used at archive creation time must be the same
       
  5500 as (or a prefix of) the classpath used at run time.
       
  5501 .RE
       
  5502 .IP "2." 3
       
  5503 Run the application \f[CB]test.Hello\f[R] with the shared archive
       
  5504 \f[CB]hello.jsa\f[R]:
       
  5505 .RS 4
       
  5506 .RS
       
  5507 .PP
       
  5508 \f[CB]java\ \-XX:SharedArchiveFile=hello.jsa\ \-cp\ hello.jar\ test.Hello\f[R]
       
  5509 .RE
       
  5510 .RE
       
  5511 .IP "3." 3
       
  5512 \f[B]Optional\f[R] Repeat step 4 of the previous section to verify that
       
  5513 the \f[CB]test.Hello\f[R] application is using the class contained in the
       
  5514 \f[CB]hello.jsa\f[R] shared archive.
       
  5515 .PP
       
  5516 To automate the above steps 1 and 2, one can write a script such as the
       
  5517 following:
       
  5518 .IP
       
  5519 .nf
       
  5520 \f[CB]
       
  5521 \ \ \ \ ARCHIVE=hello.jsa
       
  5522 \ \ \ \ if\ test\ \-f\ $ARCHIVE;\ then
       
  5523 \ \ \ \ \ \ \ \ FLAG="\-XX:SharedArchiveFile=$ARCHIVE"
       
  5524 \ \ \ \ else
       
  5525 \ \ \ \ \ \ \ \ FLAG="\-XX:ArchiveClassesAtExit=$ARCHIVE"
       
  5526 \ \ \ \ fi
       
  5527 \ \ \ \ $JAVA_HOME/bin/java\ \-cp\ hello.jar\ $FLAG\ test.Hello
       
  5528 \f[R]
       
  5529 .fi
       
  5530 .PP
       
  5531 Like an AppCDS archive, the archive needs to be re\-generated if the
       
  5532 Java version has changed.
       
  5533 The above script could be adjusted to account for the Java version as
       
  5534 follows:
       
  5535 .IP
       
  5536 .nf
       
  5537 \f[CB]
       
  5538 \ \ \ \ ARCHIVE=hello.jsa
       
  5539 \ \ \ \ VERSION=foo.version
       
  5540 \ \ \ \ if\ test\ \-f\ $ARCHIVE\ \-a\ \-f\ $VERSION\ &&\ cmp\ \-s\ $VERSION\ $JAVA_HOME/release;\ then
       
  5541 \ \ \ \ \ \ \ \ FLAG="\-XX:SharedArchiveFile=$ARCHIVE"
       
  5542 \ \ \ \ else
       
  5543 \ \ \ \ \ \ \ \ FLAG="\-XX:ArchiveClassesAtExit=$ARCHIVE"
       
  5544 \ \ \ \ \ \ \ \ cp\ \-f\ $JAVA_HOME/release\ $VERSION
       
  5545 \ \ \ \ fi
       
  5546 \ \ \ \ $JAVA_HOME/bin/java\ \-cp\ hello.jar\ $FLAG\ test.Hello
       
  5547 \f[R]
       
  5548 .fi
       
  5549 .PP
       
  5550 Currently, we don\[aq]t support concurrent dumping operations to the
       
  5551 same CDS archive.
       
  5552 Care should be taken to avoid multiple writers to the same CDS archive.
       
  5553 .PP
       
  5554 The user could also create a dynamic CDS archive with a specific base
       
  5555 archive, e.g.
       
  5556 named as \f[CB]base.jsa\f[R] as follows:
       
  5557 .RS
       
  5558 .PP
       
  5559 \f[CB]java\ \-XX:SharedArchiveFile=base.jsa\ \-XX:ArchiveClassesAtExit=hello.jsa\ \-cp\ hello.jar\ Hello\f[R]
       
  5560 .RE
       
  5561 .PP
       
  5562 To run the application using the dynamic CDS archive \f[CB]hello.jsa\f[R]
       
  5563 and a specific base CDS archive \f[CB]base.jsa\f[R]:
       
  5564 .RS
       
  5565 .PP
       
  5566 \f[CB]java\ \-XX:SharedArchiveFile=base.jsa:hello.jsa\ \-cp\ hello.jar\ Hello\f[R]
       
  5567 .RE
       
  5568 .PP
       
  5569 Note that on Windows, the above path delimiter \f[CB]:\f[R] should be
       
  5570 replaced with \f[CB];\f[R].
       
  5571 .PP
       
  5572 The above command for specifying a base archive is useful if the base
       
  5573 archive used for creating the dynamic archive has been moved.
       
  5574 Normally, just specifying the dynamic archive should be sufficient since
       
  5575 the base archive info can be retrieved from the dynamic archive header.
       
  5576 .SS Sharing a Shared Archive Across Multiple Application Processes
       
  5577 .PP
       
  5578 You can share the same archive file across multiple applications
       
  5579 processes.
       
  5580 This reduces memory usage because the archive is memory\-mapped into the
       
  5581 address space of the processes.
       
  5582 The operating system automatically shares the read\-only pages across
       
  5583 these processes.
       
  5584 .PP
       
  5585 The following steps demonstrate how to create a common archive that can
       
  5586 be shared by different applications.
       
  5587 Classes from \f[CB]common.jar\f[R], \f[CB]hello.jar\f[R] and \f[CB]hi.jar\f[R]
       
  5588 are archived in the \f[CB]common.jsa\f[R] because they are all in the
       
  5589 classpath during the archiving step (step 3).
       
  5590 .PP
       
  5591 To include classes from \f[CB]hello.jar\f[R] and \f[CB]hi.jar\f[R], the
       
  5592 \f[CB]\&.jar\f[R] files must be added to the classpath specified by the
       
  5593 \f[CB]\-cp\f[R] parameter.
       
  5594 .IP "1." 3
       
  5595 Create a list of all classes used by the \f[CB]Hello\f[R] application and
       
  5596 another list for the \f[CB]Hi\f[R] application:
       
  5597 .RS 4
       
  5598 .RS
       
  5599 .PP
       
  5600 \f[CB]java\ \-XX:DumpLoadedClassList=hello.classlist\ \-cp\ common.jar:hello.jar\ Hello\f[R]
       
  5601 .RE
       
  5602 .RS
       
  5603 .PP
       
  5604 \f[CB]java\ \-XX:DumpLoadedClassList=hi.classlist\ \-cp\ common.jar:hi.jar\ Hi\f[R]
       
  5605 .RE
       
  5606 .RE
       
  5607 .IP "2." 3
       
  5608 Create a single list of classes used by all the applications that will
       
  5609 share the shared archive file.
       
  5610 .RS 4
       
  5611 .PP
       
  5612 \f[B]Oracle Solaris, Linux, and macOS\f[R] The following commands combine
       
  5613 the files \f[CB]hello.classlist\f[R] and \f[CB]hi.classlist\f[R] into one
       
  5614 file, \f[CB]common.classlist\f[R]:
       
  5615 .RS
       
  5616 .PP
       
  5617 \f[CB]cat\ hello.classlist\ hi.classlist\ >\ common.classlist\f[R]
       
  5618 .RE
       
  5619 .PP
       
  5620 \f[B]Windows\f[R] The following commands combine the files
       
  5621 \f[CB]hello.classlist\f[R] and \f[CB]hi.classlist\f[R] into one file,
       
  5622 \f[CB]common.classlist\f[R]:
       
  5623 .RS
       
  5624 .PP
       
  5625 \f[CB]type\ hello.classlist\ hi.classlist\ >\ common.classlist\f[R]
       
  5626 .RE
       
  5627 .RE
       
  5628 .IP "3." 3
       
  5629 Create a shared archive named \f[CB]common.jsa\f[R] that contains all the
       
  5630 classes in \f[CB]common.classlist\f[R]:
       
  5631 .RS 4
       
  5632 .RS
       
  5633 .PP
       
  5634 \f[CB]java\ \-Xshare:dump\ \-XX:SharedArchiveFile=common.jsa\ \-XX:SharedClassListFile=common.classlist\ \-cp\ common.jar:hello.jar:hi.jar\f[R]
       
  5635 .RE
       
  5636 .PP
       
  5637 The classpath parameter used is the common class path prefix shared by
       
  5638 the \f[CB]Hello\f[R] and \f[CB]Hi\f[R] applications.
       
  5639 .RE
       
  5640 .IP "4." 3
       
  5641 Run the \f[CB]Hello\f[R] and \f[CB]Hi\f[R] applications with the same shared
       
  5642 archive:
       
  5643 .RS 4
       
  5644 .RS
       
  5645 .PP
       
  5646 \f[CB]java\ \-XX:SharedArchiveFile=common.jsa\ \-cp\ common.jar:hello.jar:hi.jar\ Hello\f[R]
       
  5647 .RE
       
  5648 .RS
       
  5649 .PP
       
  5650 \f[CB]java\ \-XX:SharedArchiveFile=common.jsa\ \-cp\ common.jar:hello.jar:hi.jar\ Hi\f[R]
       
  5651 .RE
       
  5652 .RE
       
  5653 .SS Specifying Additional Shared Data Added to an Archive File
       
  5654 .PP
       
  5655 The \f[CB]SharedArchiveConfigFile\f[R] option is used to specify
       
  5656 additional shared data to add to the archive file.
       
  5657 .RS
       
  5658 .PP
       
  5659 \f[CB]\-XX:SharedArchiveConfigFile=\f[R]\f[I]shared_config_file\f[R]
       
  5660 .RE
       
  5661 .PP
       
  5662 JDK 9 and later supports adding both symbols and\ string objects to an
       
  5663 archive for memory sharing\ when you have multiple JVM processes running
       
  5664 on the same host.
       
  5665 An example of this is having multiple JVM processes that use the same
       
  5666 set of Java EE classes.
       
  5667 When these common classes are loaded and used, new symbols and strings
       
  5668 may be created and added to the JVM\[aq]s internal "symbol" and "string"
       
  5669 tables.\ At runtime, the symbols or string objects mapped from the
       
  5670 archive file can be shared across multiple JVM processes, resulting in a
       
  5671 reduction of overall memory usage.\ In addition, archiving strings also
       
  5672 provides added performance benefits in both startup time and runtime
       
  5673 execution.
       
  5674 .PP
       
  5675 In JDK 10 and later, CONSTANT_String entries in archived classes are
       
  5676 resolved to interned String objects at dump time, and all interned
       
  5677 String objects are archived.
       
  5678 However, even though all CONSTANT_String literals in all archived
       
  5679 classes are resolved, it might still beneficial to add additional
       
  5680 strings that are not string literals in class files, but are likely to
       
  5681 be used by your application at run time.
       
  5682 .PP
       
  5683 Symbol data should be generated by the \f[CB]jcmd\f[R] tool attaching to a
       
  5684 running JVM process.
       
  5685 See \f[B]jcmd\f[R].
       
  5686 .PP
       
  5687 The following is an example of the symbol dumping command in
       
  5688 \f[CB]jcmd\f[R]:\ 
       
  5689 .RS
       
  5690 .PP
       
  5691 \f[CB]jcmd\f[R] \f[I]pid\f[R] \f[CB]VM.symboltable\ \-verbose\f[R]
       
  5692 .RE
       
  5693 .RS
       
  5694 .PP
       
  5695 \f[B]Note:\f[R] The first line (process ID) and the second line
       
  5696 (\f[CB]\@VERSION\ ...\f[R]) of this \f[CB]jcmd\f[R] output should be
       
  5697 excluded from the configuration file.
       
  5698 .RE
       
  5699 .SS Example of a Configuration File
       
  5700 .PP
       
  5701 The following is an example of a configuration file:
       
  5702 .IP
       
  5703 .nf
       
  5704 \f[CB]
       
  5705 VERSION:\ 1.0
       
  5706 \@SECTION:\ Symbol
       
  5707 10\ \-1:\ linkMethod
       
  5708 \f[R]
       
  5709 .fi
       
  5710 .PP
       
  5711 In the configuration file example, the \f[CB]\@SECTION:\ Symbol\f[R] entry
       
  5712 uses the following format:
       
  5713 .RS
       
  5714 .PP
       
  5715 \f[I]length\f[R] \f[I]refcount\f[R]\f[CB]:\f[R] \f[I]symbol\f[R]
       
  5716 .RE
       
  5717 .PP
       
  5718 The \f[I]refcount\f[R] for a shared symbol is always \f[CB]\-1\f[R].
       
  5719 .PP
       
  5720 \f[CB]\@SECTION\f[R] specifies the type of the section that follows it.
       
  5721 All data within the section must be the same type that\[aq]s specified
       
  5722 by \f[CB]\@SECTION\f[R].
       
  5723 Different types of data can\[aq]t be mixed.
       
  5724 Multiple separated data sections for the same type specified by
       
  5725 different \f[CB]\@SECTION\f[R] are allowed within one
       
  5726 \f[CB]shared_config_file\f[R] .
       
  5727 .SH PERFORMANCE TUNING EXAMPLES
       
  5728 .PP
       
  5729 You can use the Java advanced runtime options to optimize the
       
  5730 performance of your applications.
       
  5731 .SS Tuning for Higher Throughput
       
  5732 .PP
       
  5733 Use the following commands and advanced options to achieve higher
       
  5734 throughput performance for your application:
       
  5735 .RS
       
  5736 .PP
       
  5737 \f[CB]java\ \-server\ \-XX:+UseParallelGC\ \-XX:+UseLargePages\ \-Xmn10g\ \ \-Xms26g\ \-Xmx26g\f[R]
       
  5738 .RE
       
  5739 .SS Tuning for Lower Response Time
       
  5740 .PP
       
  5741 Use the following commands and advanced options to achieve lower
       
  5742 response times for your application:
       
  5743 .RS
       
  5744 .PP
       
  5745 \f[CB]java\ \-XX:+UseG1GC\ \-XX:MaxGCPauseMillis=100\f[R]
       
  5746 .RE
       
  5747 .SS Keeping the Java Heap Small and Reducing the Dynamic Footprint of
       
  5748 Embedded Applications
       
  5749 .PP
       
  5750 Use the following advanced runtime options to keep the Java heap small
       
  5751 and reduce the dynamic footprint of embedded applications:
       
  5752 .RS
       
  5753 .PP
       
  5754 \f[CB]\-XX:MaxHeapFreeRatio=10\ \-XX:MinHeapFreeRatio=5\f[R]
       
  5755 .RE
       
  5756 .RS
       
  5757 .PP
       
  5758 \f[B]Note:\f[R] The defaults for these two options are 70% and 40%
       
  5759 respectively.
       
  5760 Because performance sacrifices can occur when using these small
       
  5761 settings, you should optimize for a small footprint by reducing these
       
  5762 settings as much as possible without introducing unacceptable
       
  5763 performance degradation.
       
  5764 .RE
       
  5765 .SH EXIT STATUS
       
  5766 .PP
       
  5767 The following exit values are typically returned by the launcher when
       
  5768 the launcher is called with the wrong arguments, serious errors, or
       
  5769 exceptions thrown by the JVM.
       
  5770 However, a Java application may choose to return any value by using the
       
  5771 API call \f[CB]System.exit(exitValue)\f[R].
       
  5772 The values are:
       
  5773 .IP \[bu] 2
       
  5774 \f[CB]0\f[R]: Successful completion
       
  5775 .IP \[bu] 2
       
  5776 \f[CB]>0\f[R]: An error occurred