6 Command-Line Options
This topic describes the various HotSpot command-line options and compares them with those available in Oracle JRockit:
Mapping of Oracle JRockit to HotSpot Command-Line Options
Certain Oracle JRockit command-line options are similar to HotSpot options.
This section provides either a one-to-one mapping of Oracle JRockit options to HotSpot options, or refers you to other sections of this document. There are certain Oracle JRockit options for which there are no corresponding HotSpot JVM options. Also, some of the mapped HotSpot options aren’t exactly equivalent to the Oracle JRockit options and may provide slightly different behavior on the HotSpot.
When migrating, simply translating every option used with Oracle JRockit into similar HotSpot options isn’t recommended. Especially for performance-related options, the best practice is to start by only specifying the Java heap size and the garbage collector, such as CMS or G1. Any additional tuning for HotSpot, if necessary, must be done based on new benchmarking and profiling done with HotSpot. It isn’t advised to assume that most, if any, JVM-level tuning decisions made for an Oracle JRockit configuration will also apply to a HotSpot configuration.
Table 6-1 -X Command-Line Options
Oracle JRockit | HotSpot | Notes |
---|---|---|
|
Same |
NA |
|
Same |
NA |
|
Same |
NA |
|
Same |
NA |
|
Same |
NA |
|
NA |
|
|
NA |
See Garbage Collectors. |
|
|
NA |
|
NA |
NA |
|
Same |
NA |
|
Same |
NA |
|
Same |
Don’t use, except for troubleshooting. |
|
NA |
|
|
Same |
NA |
|
|
See Garbage Collectors. |
|
Same |
NA |
|
Same |
NA |
|
NA |
NA |
|
|
See Logging. |
|
NA |
See Logging. |
|
NA |
See Logging. |
|
NA |
See Logging. |
Table 6-2 -XX Command-Line Options
Oracle JRockit | HotSpot | Notes on HotSpot Options |
---|---|---|
|
|
|
|
Related options:
|
NA |
|
|
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
|
See Runtime Options. |
|
Same |
NA |
|
Same |
NA |
|
NA |
On the HotSpot side, there is an option |
|
NA |
NA |
|
NA |
NA |
|
Same |
NA |
|
NA |
NA |
|
NA |
NA |
|
Same |
NA |
|
Same |
Enables the use of the Java Flight Recorder (JFR) during the runtime of the application. This is a commercial feature that requires you to also specify the |
|
Same |
NA |
|
NA |
NA |
|
NA |
NA |
|
Related options:
|
See Garbage Collectors. |
|
Related options:
|
See Garbage Collectors. |
|
NA |
NA |
|
NA |
NA |
|
Related options:
|
See Garbage Collectors. |
|
Can achieve the same by using |
Example:
|
|
NA |
NA |
|
NA |
NA |
|
Same |
NA |
- |
Same |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
|
Sets the ratio between the eden space size and the survivor space size. By default, this option is set to 8. There is another option |
|
NA |
NA |
|
|
|
|
Same |
NA |
|
|
Sets the ratio between young and old generation sizes. By default, this option is set to 2. |
|
|
See Runtime options. |
|
NA |
NA |
|
NA |
NA |
|
Related options:
|
See Garbage Collectors. |
|
|
|
|
Related options:
|
NA |
|
|
|
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
Same |
NA |
|
|
Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB). If this option is set to 0, then the JVM chooses the initial size automatically. |
|
NA |
NA |
|
NA |
NA |
|
Related options:
|
NA |
|
|
NA |
|
NA |
NA |
|
- |
Disables garbage collection (GC) of classes. This can save the GC time, which shortens interruptions during the application run. When you specify |
|
NA |
NA |
|
NA |
NA |
|
NA |
NA |
|
|
See Runtime Options. |
|
|
See Runtime Options. |
|
NA |
NA |
|
NA |
No direct corresponding option available in HotSpot but the low heap base can be specified explicitly using |
|
Same |
Only relevant for JDK 5. This option must not be used on JDK 6 or later versions. |
|
Same |
On HotSpot, this option is enabled by default for the Windows platform. On JRockit, this option is disabled by default for the Windows platform. |
Table 6-3 Diagnostic Commands
Oracle JRockit | HotSpot |
---|---|
|
|
|
|
|
|
|
NA |
|
NA |
|
|
|
|
|
|
|
|
|
|
|
NA |
|
NA |
|
NA |
|
|
|
NA |
|
|
|
|
|
|
|
|
|
|
|
|
|
NA |
|
|
|
|
|
|
|
|
|
NA |
|
NA |
|
|
jcmd Commands
The following are the list of jcmd commands:
-
JFR.configure
-
JFR.stop
-
JFR.start
-
JFR.dump
-
JFR.check
-
VM.log
-
VM.native_memory
-
VM.check_commercial_features
-
VM.unlock_commercial_features
-
ManagementAgent.status
-
ManagementAgent.stop
-
ManagementAgent.start_local
-
ManagementAgent.start
-
Compiler.directives_clear
-
Compiler.directives_remove
-
Compiler.directives_add
-
Compiler.directives_print
-
VM.print_touched_methods
-
Compiler.codecache
-
Compiler.codelist
-
Compiler.queue
-
VM.classloader_stats
-
Thread.print
-
JVMTI.data_dump
-
JVMTI.agent_load
-
VM.stringtable
-
VM.symboltable
-
VM.class_hierarchy
-
GC.class_stats
-
GC.class_histogram
-
GC.heap_dump
-
GC.finalizer_info
-
GC.heap_info
-
GC.run_finalization
-
GC.run
-
VM.info
-
VM.uptime
-
VM.dynlibs
-
VM.set_flag
-
VM.flags
-
VM.system_properties
-
VM.command_line
-
VM.version help