Command Line Reference

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

-X Command-line Options

Non-standard, or -X, command line options are options that are exclusive to Oracle JRockit JVM that change the behavior of JRockit JVM to better suit the needs of different Java applications. These options are all preceded by -X and will not work on other JVMs (conversely, the non-standard options used by other JVMs won't work with JRockit JVM).

Note: Since these options are non-standard, they are subject to change at any time.

This chapter is the complete reference to all -X startup flags that can be set in JRockit JVM. Each option is listed in alphabetical order.

 


-Xbootclasspath

This option specifies a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK.

Note: Applications that use this option to override a class in rt.jar should not be deployed. Doing so would contravene the Java 2 Runtime Environment binary code license.

Operation

Format: -Xbootclasspath <directories and zips/jars separated by ; (Windows) or : (Linux)>

Enter this option at startup to create the default classpath for bootstrap classes and resources. This option must be entered in lower case, not camel notation, as shown in the example.

Flags or Other Options Affected

Exceptions

None

 


-Xbootclasspath/a

This option is similar to -Xbootclasspath in that it specifies a semicolon-separated path of directories, JAR archives, and ZIP archives; however, this list is appended to the default bootstrap class path.

Operation

Format: -Xbootclasspath/a <directories and zips/jars separated by ; (Windows) or : (Linux)>

Enter this option at startup to append a list of directories, JAR archives, and ZIP archives to the default classpath for bootstrap classes and resources. This option must be entered in lower case, not camel notation, as shown in the example.

Flags or Other Options Affected

Exceptions

None

 


-Xbootclasspath/p

This option is similar to -Xbootclasspath in that it specifies a semicolon-separated path of directories, JAR archives, and ZIP archives; however, this list is prepended to the default bootstrap class path.

Operation

Format: -Xbootclasspath/p <directories and zips/jars separated by ; (Windows) or : (Linux)>

Enter this option at startup to prepend a list of directories, JAR archives, and ZIP archives to the default classpath for bootstrap classes and resources. This option must be entered in lower case, not camel notation, as shown in the example.

Flags or Other Options Affected

Exceptions

None

 


-Xcheck:jni

Enables additional checks for JNI functions.

Operation

Format: -Xcheck:jni

Include this option at startup.

Flags or Other Options Affected

None

Exceptions

None

 


-XclearType

Deprecated

Use this option to define when the memory occupied by an object that has been garbage collected will be cleared. You can set objects clearing at allocation time, garbage collection time, or when a thread-local area is allocated.

Note: This option is deprecated as of the JRockit JVM R25. If you use it with that or any subsequent releases, the JVM will accept the option without throwing an exception, but nothing will happen.
Note: The following information for -XclearType applies only to the JRockit JVM R24 and earlier.

Operation

Format: -XclearType:<param>

Set the desired parameter (<param>) as described in Table 2-1 to define the when object clearing will occur.

Table 2-1 Valid Parameters for -XclearType
<param>
Description
alloc
Starts clearing objects at allocation time.
gc
Starts clearing objects when the garbage collection is running.
local
Starts clearing objects when a thread-local area is allocated.

Default Value

If -XclearType is not set, object clearing will default to the following:

Flags or Other Options Affected

None

Exceptions

None

 


-Xdebug

-Xdebug enables debugging capabilities in the JVM which are used by the Java Virtual Machine Tools Interface (JVMTI). JVMTI is a low-level debugging interface used by debuggers and profiling tools. With it, you can inspect the state and control the execution of applications running in the JVM.

The subset of JVMTI that is most typically used by profilers is always available. However, the functionality used by debuggers to be able to step through the code and set breakpoints has some overhead associated with it and is not always available. To enable this functionality you must use the -Xdebug option.

WARNING: When running with -Xdebug the JVM is not running at its full speed. Thus, the option should not be used for applications when running in production environments.

Operation

Format: -Xdebug

Include this option at startup.

For Example:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n myApp

Flags or Other Options Affected

None

Exceptions

None

 


-Xgc

Use -Xgc to set a static garbage collector. The static garbage collectors are classified as in

Table 2-2 Static Garbage Collectors
 
Single-Spaced
Generational
Concurrent
Single-spaced concurrent
Generational concurrent
-Xgc: gencon
Parallel
Single-spaced parallel
-Xgc:singlepar (since R27.2) or -Xgc: parallel
Generational parallel
-Xgc:genpar (since R27.2)

Table 2-2.

Under some circumstances, the performance of these static garbage collectors might meet your needs better than the dynamic garbage collection modes or the default collectors available with the -server or -client flags. Additionally, if you want to use scripts written for the earlier versions of JRockit JVM that implement these collectors, those scripts will continue to work without requiring any modification—unless they use the generational copy garbage collector, which is no longer available.

Operation

Format: -Xgc:<gcType>

Use -Xgc with one of the garbage collection types (<gcType>) listed in Table 2-3 to get the desired garbage collector algorithm:

Table 2-3 Valid Garbage Collection Types for -Xgc
<gcType>
Description
singlecon
Sets a single-spaced (non-generational) concurrent garbage collector. This is a mostly concurrent garbage collector, which means that it will perform most of its garbage collection chores concurrently with the Java application. All objects are maintained in a single space, or “generation.” The singlecon garbage collection trades lower application throughput for minimal pause times.
gencon
Sets a generational, concurrent garbage collector. With this type of garbage collector, objects are allocated in the young generation (the nursery). When the nursery is full, JRockit JVM stops all Java threads and moves the live objects in the young generation to the old generation. This is a mostly concurrent garbage collector, which means that it will perform most of its garbage collection chores concurrently with the Java application. The gencon garbage collector is better than the singlecon garbage collector for most applications that allocate a lot of small, short-lived objects. The gencon garbage collection trades minimal pause times for larger heap sizes and lower application throughput.
singlepar
parallel
Sets a single-spaced, parallel garbage collector. A parallel garbage collector stops all Java threads when the heap is full and uses every CPU to perform a complete garbage collection of the entire heap. A parallel collector can have longer pause times than concurrent collectors, but it maximizes throughput. Even on single CPU machines, this maximized performance makes parallel the recommended garbage collector, provided that your application can tolerate the longer pause times.
The singlepar synonym is available in R27.2 and later releases.
genpar
Sets a generational garbage collector. With this type of garbage collector, objects are first allocated in the young generation. When the nursery is full, JRockit JVM stops all Java threads and performs a parallel nursery collection, that is, it uses all CPU resources available and moves all live objects in the young generation to the old generation. The old generation collector stops all Java threads when the heap is full and a complete parallel garbage collection is performed. This collector will prioritize throughput to pause times.
This collector is generally better than the singlepar garbage collector for applications that allocate a lot of short-lived objects. While it performs more garbage collections than the singlepar collector, the individual pause times of the genpar collector are shorter and it creates less fragmentation in the old generation space.
This option is available in R27.2 and later releases.

Default Value

These defaults apply to -Xgc:

Flags or Other Options Affected

When you specify -Xgc, the following options are affected:

Exceptions

When using -Xgc, be aware of the following exceptions:

 


-XgcPause

The -Xgcpause option prints out the pause times caused by the garbage collector during a run. The pause times are shown during runtime on your screen during the running of the application.

The effect of this option is identical to -Xverbose:gcpause.

Operation

Format: -XgcPause

Use this option at startup. As pauses are encountered, they will print a report to your screen, as shown in Listing 2-1.

Listing 2-1 Output from -Xgcpause used with the Static Garbage Collector -Xgc:gencon
[memory ] old collection phase 0-2 pause time: 100.794255 ms
[memory ] nursery collection pause time: 4.121775 ms
[memory ] nursery collection pause time: 185.137069 ms
[memory ] old collection phase 4-5 pause time: 147.672697 ms
[memory ] (pause includes yc: 142.537 ms, compaction: 1.317 ms, update ref: 1.41 3 ms)
[memory ] nursery collection pause time: 7.075705 ms
[memory ] old collection phase 5 pause time: 0.300176 ms

Flags or Other Options Affected

None

Exceptions

None

 


-XgcPrio

-XgcPrio sets a dynamic garbage collection mode. This garbage collector combines all types of garbage collection heuristics and optimizes the performance accordingly. When running this garbage collector, you only need to determine whether your application responds best to optimal memory throughput during collection or minimized pause times. The dynamic garbage collector will then adapt its choice of collector type, in runtime, to what is suiting your application the best.

Note: This command line option is supported with JRockit JDK 1.4.2_10 R26.2 and later versions, as well as all versions of JRockit JDK 5.0 and JRockit JDK 6.

Operation

Format: -XgcPrio:<gcType>

Combine -XgcPrio with one of the garbage collection types (<gcType>) described in Table 2-4:

Table 2-4 Garbage Collection Types Valid for -XgcPrio
<gcType>
Description
throughput
The garbage collector is optimized for application throughput. This means that the garbage collector works as effectively as possible, giving as much CPU resources to the Java threads as possible. This may, however, cause non-deterministic pauses when the garbage collector stops all Java threads for garbage collection.The throughput priority should be used when non-deterministic pauses do not impact the application’s behavior.
pausetime
The garbage collector is optimized for short pauses. This means that the garbage collection will work concurrently with the Java application when necessary, in order to avoid pausing the Java threads. This inflicts a slight performance overhead to the application, as the concurrent garbage collector demands more system resources (CPU time and memory) than the parallel garbage collector that is used for optimal throughput. The target pause time is by default 200 ms. To change the default pause target, see -XpauseTarget.
deterministic
The garbage collector is optimized for very short and deterministic pause times.The garbage collector will aim on keeping the garbage collection pauses below a given pause target. How well it will succeed depends on the application and the hardware. For example, a pause target on 30 ms has been verified on an application with 1 GB heap and an average of 30% live data or less at collection time, running on the following hardware:
2 x Intel Xeon 3.6 GHz, 2 MB level 2 cache, 4 GB RAM
4 x Intel Xeon 2.0 GHz, 0.5 MB level 2 cache, 8 GB RAM
Running on slower hardware, with a different heap size and/or with more live data might break the deterministic behavior or cause performance degradation over time, while faster hardware or less live data might allow you to set a lower pause target.
The pause target for deterministic mode is by default 30 ms, and can be changed with the command line option -XpauseTarget.

Default

Flags or Other Options Affected

Use of -XgcPrio will affect certain options as described here:

Exceptions

You cannot combine the dynamic garbage collector with a static garbage collector set with -Xgc or -XXsetGC.

If you set -XXdisableGCHeuristics, then there will be no change of garbage collection strategy as a result of the -XgcPrio option.

 


-XgcReport

The -XgcReport option generates an end-of-run report that shows garbage collection statistics. You can use this report to determine if you’re using the most effective garbage collector for your application or not.

The report divides the statistics into “young collections” and “old collections”, and for each of the types the following information is printed:

The effect of this option is identical to -Xverbose:gcreport.

Operation

Format: -XgcReport

As shown in Listing 2-2, the -Xgcreport shows a detailed profile of collections on both the young generation and the old generation.

Listing 2-2 Dynamic Xgcprio:pausetime + Xgcreport (at the end of the application run):
[memory ] Memory usage report
[memory ]
[memory ] young collections
[memory ] number of collections = 50
[memory ] total promoted = 4628936 (size 260614072)
[memory ] max promoted = 108102 (size 6083128)
[memory ] total GC time = 4.381 s
[memory ] mean GC time = 87.623 ms
[memory ] maximum GC Pauses = 125.264 , 153.122, 244.682 ms
[memory ]
[memory ] old collections
[memory ] number of collections = 6
[memory ] total promoted = 0 (size 0)
[memory ] max promoted = 0 (size 0)
[memory ] total GC time = 0.701 s (pause 0.701 s)
[memory ] mean GC time = 116.833 ms (pause 116.830 ms)
[memory ] maximum GC Pauses = 134.081 , 190.973, 215.381 ms
[memory ]
[memory ]     number of parallel mark phases    = 6
[memory ] number of parallel sweep phases = 4
[memory ] number of concurrent sweep phases = 2
Mon Nov 1 16:50:34 WEST 2004

Flags or Other Options Affected

None

Exceptions

None

 


-XlargePages

This option tells the JRockit JVM to use large pages, if they are available, for the Java heap and other areas in the JVM. Large pages allow your application to more effectively use the translation look-aside buffer (TLB) in the processor.

Note: While this option duplicates the functionality of -XXlargePages, this is the preferred option for enabling large pages.

Operation

Format: -XlargePages

Windows, Linux and Solaris all support multiple page sizes on x86, IPF and SPARC architectures. x86 supports 4 KB and 4 MB (2 KB and 2 MB in PAE mode), while IPF and SPARC support a wider range of different sizes, from 4 KB to 256M, depending on model.

Format: -XlargePages:exitOnFailure=true

By default the JVM will continue running without large pages if large pages cannot be acquired when -XlargePages is enabled. Use this extended option to override this behavior and force the JVM to exit if enough large pages can’t be acquired. This extended option is supported in JRockit JVM R27.5 and later releases.

How to Configure Large Pages

If you use this option, you will need to configure large pages on you machine. To do so, use one of the following procedures.

On Linux
  1. Reserve memory to be used for large pages by executing the following command:
  2. echo nn > /proc/sys/vm/nr_hugepages

    Where nn is the number of desired pages.

    You should do this step as soon as possible after the machine has been started since ongoing memory usage creates fragmentation and Linux might be unable to allocate the number of specified pages.

    Note: The following steps might need to be completed by your system administrator, unless you have administrative privileges.
  3. To enable the JRockit JVM to allocate large pages, make a hugetblfs file system available by using this command:
  4. mount -t hugetlbfs nodev /mnt/hugepages
  5. Grant the user executing the Java application read and write permission to the file system. You can do this with either the mount command or with the chmod and chown commands.

For a more thorough description of large pages on Linux, read the file vm/hugetlbpage.txt available in the documentation for the Linux kernel.

On Windows
  1. As Administrator, give the user who will run the application the permission to lock pages in memory by opening the Start menu and selecting:
  2. Control Panel>Administrative>Tools>Local Security Policy>Local Policies>User Rights>Assignments>Lock pages in memory.

  3. Select Lock pages in memory.
  4. Make enough free consecutive memory available by either logging off your computer or rebooting it.
On Solaris

Nothing has to be configured in the O/S to enable an application to use large pages.

Failure to Acquire Large Pages

If the JRockit JVM fails to acquire large pages, it will print a warning and continue; for example:

[WARN ] Unable to acquire large pages for the heap, using normal pages

Default Values

-XXlargePages is disabled by default.

Other Options or Flags Affected

None

Exceptions

None

 


-Xmanagement

This option starts the JRockit JVM concurrently with the management server and allows you to either enable and configure or explicitly disable security features such as SSL encryption and authentication.

Operation

Format: -Xmanagement[:<argument1>=<value1>[,<argument2>=<value2>]]

where argumentn and valuen is as defined in Table 2-5.

Table 2-5 -Xmanagement Arguments
Argument
Description
autodiscovery=<true|false>
Enables or disables autodiscovery, which allows Oracle JRockit Mission Control to automatically discover running JRockit JVM instances through the multicast-based JRockit Discovery Protocol.
Valid with JRockit JVM 5.0.
ssl=<true|false>
Enables or disables SSL encryption.
Valid with JRockit JVM 5.0.
authenticate=<true|false>
Enables or disables authentication.
Valid with JRockit JVM 5.0.
port=<portNumber>
Identifies the port that the management server will open for remote access.
Valid with JRockit JVM 5.0.
class=
This option loads the class and causes its empty constructor to be called early in JVM startup. From the constructor, a new thread is then started, from which your management client is run. Further arguments cannot be given to -Xmanagement after the class argument.

For Example:

The implementation of this option in JRockit JVM R27.1.0 represents a change from previous versions of the product. In past versions, this option enabled the management server running:

The original RMP implementation had no security features. JRockit JVM 5.0 contains new security features—authentication and SSL encryption—that were introduced in J2SE 5.0, but similar security features were not enabled in the JRockit JVM 1.4.2.

Due to the security risks and the mission-critical nature of most JRockit JVM deployments, the new default behavior of the JRockit JVM requires that you either disable security explicitly or configure and enable security. If you don’t take these steps, the management server will not open a port for remote access and may cause the JVM startup to halt with an error message concerning the security configuration.

Specifying -Xmanagement also enables a local in-memory agent to improve the user experience from a developer perspective. For example, a developer running a WLS instance on JRockit JVM on a one machine can specify – Xmanagement to enable the local in-memory agent to connect to it from an Oracle JRockit Mission Control Client on another machine. On the other hand, you would not need to specify -Xmanagement to get local access from JRockit Mission Control: the in-memory agent is always accessible locally. Thus, if you have a number of JRockit JVM instances running on your machine and you start a JRockit Mission Control Client, it will automatically discover and allow access to those JVMs. Security is enforced by only allowing this type of local access if the JRockit JVM instance and the JRockit Mission Control Client are being run by the same user. Note that this will only work if the monitored JRockit JVM is R27.1 and later.

To enable the management agent without security you must now specify that SSL and authentication should be disabled. Also, the JMX server port must now be specified explicitly with the JRockit JVM 5.0.

For maximum usability, you should also enable the autodiscovery mechanism, which allows JRockit Mission Control to automatically discover running JRockit JVM instances through the multicast based JRockit Discovery Protocol. Note that this will normally only work on the local subnet.

To limit the number of RMP connections running at the same time, you can set -Djrockit.managementserver.maxconnect.

Default Value

The default value is based on the version of the JRockit JVM you are running:

R26.4 and Earlier

J2SE 5.0:

J2SE 1.4.2:

5.0 R27.1

Flags or Other Options Affected

None

Exceptions

None

 


-Xms

The -Xms option sets the initial and minimum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection.

Note: -Xms does not limit the total amount of memory that the JVM can use.

Operation

Format: -Xms<size>[g|G|m|M|k|K]

Combine -Xms with a memory value and add a unit.

For Example:

java -Xms:64m myApp

sets the initial and minimum java heap to 64 MB.

If you do not add a unit, you will get the exact value you state; for example, 64 will be interpreted as 64 bytes, not 64 megabytes or 64 kilobytes.

For best performance, set -Xms to the same size as the maximum heap size, for example:

java -Xgcprio:throughput -Xmx:64m -Xms:64m myApp

Default Values

If you do not set this, the minimum Java heap size defaults to (depending on which mode you are running):

Flags or Other Options Affected

None

Exceptions and Recommendations

The initial Java heap cannot be set to a smaller value than 8 MB, which is the minimum Java heap size. If you attempt to set it to a smaller value, JRockit JVM defaults to 8 MB.

The -Xms value cannot exceed the value set for -Xmx (the maximum Java heap size).

 


-Xmx

This option sets the maximum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection. Depending upon the kind of operating system you are running, the maximum value you can set for the Java heap can vary.

Note: -Xmx does not limit the total amount of memory that the JVM can use.

Operation

Format: -Xmx<size>[g|G|m|M|k|K]

Combine -Xmx with a memory value

For Example:

java -Xmx:1g myApp

sets the maximum java heap to 1 gigabyte.

If you do not add a unit, you will get the exact value you state; for example, 64 will be interpreted as 64 bytes, not 64 megabytes or 64 kilobytes.

The -Xmx option and -Xms option in combination are used to limit the Java heap size. The Java heap can never grow larger than -Xmx. Also, the -Xms value can be used as “minimum heap size” to set a fixed heap size by setting -Xms = -Xmx when, for example, you want to run benchmark tests.

Known Issue for Linux Users

The JRockit JVM R26.0.0 on Linux IA32 can experience problems setting up memory for object allocation. When this happens, you will receive the following message:

[JRockit] ERROR: Fatal error in JRockit during memory setup phase. 
Try to reduce the heap size using -Xmx:<size>m, i.e. “-Xmx:16m”. Could
not create the Java virtual machine.

and JRockit JVM will be exited.

The workaround for this situation is to try different -Xmx values until you find a heap size that is setup correct.

Note: This known issue is valid for R26.0.0.

Default Value

If you do not set this, the maximum java heap size depends on the platform and the amount of memory in the system as described in Table 2-6.

Table 2-6 Default Maximum Heap Sizes
Release
Platform
Default Maximum Heap Size
R27.2 and older
Windows
75% of total physical memory up to 1 GB
R27.2 and older
Linux, Solaris
50% of available physical memory up to 1 GB
R27.3 and newer
Windows on a 64 bit platform
75% of total physical memory up to 2 GB
R27.3 and newer
Linux or Solaris on a 64 bit platform
50% of available physical memory up to 2 GB
R72.3 and newer
Windows on a 32 bit platform
75% of total physical memory up to 1 GB
R27.3 and newer
Linux on a 32 bit platform
50% of available physical memory up to 1 GB

Flags or Other Options Affected

None.

Exceptions

When using-Xmx, be aware of the following exceptions:

 


-XnoClassGC

This option disables garbage collection of classes. Using -XnoClassGC can save some garbage collection time, which will shorten interruptions during the application run.

Operation

Format: -XnoClassGC

When you specify -XnoClassGC at startup, the class objects in the application specified by myApp will be left untouched during garbage collection 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.

Flags or Other Options Affected

None

Exceptions

None

 


-Xnohup

This option helps to prevent possible interference when JRockit JVM is running as a service and receives CTRL_LOGOFF_EVENT or SIGHUP. Upon receiving such events, the VM tries to initiate a shutdown but this shutdown will fail, since the operating system will not actually terminate the process.

Note: -Xnohup is similar to the Sun Microsystems command-line option -Xrs, developed for their HotSpot JVM. The JRockit JVM supports both -Xrs and -Xnohup. If you use -Xrs, you will see the same behavior that you would see with -Xnohup.

Operation

Format: -Xnohup

If you are running JRockit JVM as a service (for example, the servlet engine for a web server), enter the command at startup to prevent the JVM from watching for or processing CTRL_LOGOFF_EVENT or SIGHUP events.

Flags or Other Options Affected

None

Exceptions

If you specify -Xnohup, be aware of the following:

 


-XnoOpt

This option turns off adaptive optimization. While optimized code generally runs faster than code that hasn’t been optimized, occasionally, the time required to optimize code results in undesirable delays processing. -XnoOpt lets you avoid these delays by turning off optimization. This option is also helpful when you suspect that a JVM or application problem, such as a system crash or poor startup performance, might be related to optimization. You can turn optimization off and retry your application. If it then runs successfully, you can safely assume that the problem lies with code optimization.

Operation

Format: -XnoOpt

Note that if you use -XnoOpt, you will continue to compile code that might be inefficient and might have a deleterious affect on application performance.

Default Value

If -XnoOpt is not set, the JVM will optimize code as usual.

Flags or Other Options Affected

If you use -XXnoJITInline, you must also use -XnoOpt. -XXnoJITInline only disables inlining the first time a method is compiled. Unless you set -XnoOpt as well, methods can still be inlined when code is optimized.

Exceptions

None

 


-Xns

-Xns sets the nursery size. the JRockit JVM uses a nursery when the generational garbage collection model is used, that is, when the dynamic garbage collector has determined that the generational garbage collection model should be used or when the static generational concurrent garbage collector ( -Xgc : gencon) has been selected. You can also use -Xns to set a static nursery size when running a dynamic garbage collector (-XgcPrio).

Operation

Format: -Xns:<size>[g|G|m|M|k|K]

Combine -Xns with a memory value

For Example:

java -Xns:10m myApp

sets the nursery to 10 MB of the heap.

The nursery size value cannot exceed the maximum value set for the heap.

Default Value

Default value depends upon whether you use a dynamic garbage collector (the default garbage collector) or the select a static garbage collector, see Table 2-7

Table 2-7 Default Nursery Sizes
Options used
Default value
-server (default)
50% of free heap
-client
None; the default garbage collector in -client mode is single-spaced.
-Xgc:gencon
10 MB per logical processor
-Xgc:genpar
50% of free heap
-Xgcprio:throughput
10 MB per logical processor
-Xgcprio:pausetime
50% of free heap

Flags or Other Options Affected

None

Exceptions

When using -Xns, be aware of the following exceptions:

 


-XpauseTarget

This option sets a pause target for the dynamic garbage collection mode optimizing for short pauses ( -XgcPrio : pausetime) and the dynamic garbage collection mode optimizing for deterministic pauses ( -XgcPrio : deterministic). The target value is used as a pause time goal. The target helps the dynamic garbage collector to more precisely configure itself to keep pauses near the target value. Using this option allows you to specify the pause target to be between 1 ms and 5 seconds. If you are using the deterministic garbage collector, you can set values below 200 ms you must have a valid license for -XgcPrio : deterministic.

Operation

Format: -XpauseTarget=<target value>

Or

-XpauseTarget=<target value> -Xgcprio:pausetime

Remember that the target set by this option is considered a soft goal; that is, if specifying the target to 100 ms, the garbage collector will try to tune itself towards a configuration that will make the pauses become as near 100 ms as possible. However, if you have an application and heap configuration that will not be able to meet this target however much the garbage collector is tuned (statically or dynamically), the target will be missed. This option only specified the desired pause times, not the maximum allowed pause time.

Used with care this option will improve pause times, however if used with less care, it might stress the garbage collector to less appreciated behavior.

Default Value

If you are using -XpauseTarget with -XgcPrio : pausetime, the default setting for the target is 500 ms. If you are using -XgcPrio : deterministic, the default value is 30 ms.

Flags or Other Options Affected

Normally, this option requires that you use it with a dynamic pause optimizing garbage collection mode ( -XgcPrio : pausetime or -XgcPrio : deterministic ). If you don’t specify a garbage collector, this option will change from the default garbage collector to the pause time optimizing garbage collector (the same collector used when specifying -XgcPrio : pausetime).

If you are using Oracle JRockit Real Time, set -XgcPauseTarget to below 200 ms, and don’t specify a garbage collector, the garbage collector will be set to -XgcPrio : deterministic.

Exceptions

When using -XpauseTarget, be aware of the following exceptions:

 


-Xrs

Note: -Xrs is a non-standard option developed by Sun Microsystems for their HotSpot JVM. JRockit JVM continues to support this option; however the JRockit JVM non-standard option -Xnohup provides the same functionality.

-Xrs reduces usage of operating-system signals by the JVM. If the JVM is run as a service (for example, the servlet engine for a web server), it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown since the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs command-line option does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT.

Operation

Format: -Xrs

If you are running JRockit JVM as a service (for example, the servlet engine for a web server), enter the command at startup to prevent the JVM from watching for or processing CTRL_LOGOFF_EVENT or SIGHUP events.

Flags or Other Options Affected

None

Exceptions

If you specify -Xnohup, be aware of the following:

 


-Xrunjdwp

This option loads the JPDA reference implementation of JDWP. This library resides in the target VM and uses JVMDI and JNI to interact with it. It uses a transport and the JDWP protocol to communicate with a separate debugger application.

Operation

Format: -Xrunjdwp:<name1>[=<value1>],<name2>[=<value2>]...

The -Xrunjdwp option can be further qualified by specifying one of the sub-options listed in Table 2-8.

Table 2-8 -Xrunjdwp Sub-options
Name
Required?
Default Value
Description
help
no
N/A
Prints a brief help message and exits the VM.
transport
yes
none
Name of the transport to use in connecting to debugger application.
server
no
“n”
If “y”, listen for a debugger application to attach; otherwise, attach to the debugger application at the specified address.
If “y” and no address is specified, choose a transport address at which to listen for a debugger application, and print the address to the standard output stream.
address
yes, if server=n
no, otherwise
““
Transport address for the connection. If server=n, attempt to attach to debugger application at this address. If server=y, listen for a connection at this address.
launch
no
none
At completion of JDWP initialization, launch the process given in this string. This option is used in combination with onthrow and/or onuncaught to provide “Just-In-Time debugging” in which a debugger process is launched when a particular event occurs in this VM.
Note that the launched process is not started in its own window. In most cases the launched process should be a small application which in turns launches the debugger application in its own window.
The following strings are appended to the string given in this argument (space-delimited). They can aid the launched debugger in establishing a connection with this VM. The resulting string is executed.
The value of the transport sub-option.
The value of the address sub-option (or the generated address if one is not given)
onthrow
no
none
Delay initialization of the JDWP library until an exception of the given class is thrown in this VM. The exception class name must be package-qualified.Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown.
onuncaught
no
“n”
If “y”, delay initialization of the JDWP library until an uncaught exception is thrown in this VM. Connection establishment is included in JDWP initialization, so it will not begin until the exception is thrown. See the JDI specification for com.sun.jdi.ExceptionEvent for a definition of uncaught exceptions.
stdalloc
no
“n”
By default, the JDWP reference implementation uses an alternate allocator for its memory allocation. If “y”, the standard C runtime library allocator will be used. This option is mainly for testing; use it with care. Deadlocks can occur in this VM if the alternative allocator is disabled.
strict
no
“n”
If “y”, assume strict JVMDI conformance. This will disable all workarounds to known bugs in JVMDI implementations. This option is mainly for testing and should be used with care.
suspend
no
“y”
If “y”, VMStartEvent has a suspend Policy of SUSPEND_ALL. If “n”, VMStartEvent has a suspend policy of SUSPEND_NONE.

For example:

java -Xrunjdwp:transport=dt_socket,server=y,address=8000 myApp

This command:

This command:

This command:

This command:

This command:

This command:

Flags or Other Options Affected

None

Exceptions

None

 


-Xss

-Xss sets the thread stack size. Thread stacks are memory areas allocated for each Java thread for their internal use. This is where the thread stores its local execution state.

Operation

Format: -Xss<size>[g|G|m|M|k|K]

Combine -Xss with a memory value

For Example:

java -Xss:512k myApp

sets the default stack size to 512 kilobytes.

If you do not add a unit, you will get the exact value you state; for example, 64 will be 64 bytes, not 64 megabytes or 64 kilobytes.

Default Value

-Xss default values are platform-specific, as defined in Table 2-9.

Table 2-9 -Xss Default Values
Platform
Default
Windows IA32
64 KB
Linux IA32
128 KB
Windows x86_64
128 KB
Linux x86_64
256 KB
Windows IA64
320 KB
Linux IA64
1024 KB (1 MB)
Solaris Sparc
512 KB

Flags or Other Options Affected

None

Exceptions

None

 


-XstrictFP

This option enables strict floating point arithmetics globally for all methods in all classes. With -XstrictFP set, the JVM calculates with more precision, and with a greater range of values than the Java specification requires. When you use -XstrictFP, the compiler generates code that adheres strictly to the Java specification to ensure identical results on all platforms. Without -XstrictFP, the JVM will not be as strict in enforcing floating point values.

This option is similar to the Java keyword strictfp; however, that keyword applies at the class level whereas -XstrictFP applies globally. See the Java Language Specification for more details on strictfp.

Operation

Format: -XstrictFP

Flags or Other Options Affected

None

Exceptions

None

 


-Xverbose

-Xverbose lets JRockit JVM output specific information about the system. The output is by default printed to the standard output for error messages (stderr) but you can redirect it to a file by using the -XverboseLog command line option. The information displayed depends on the parameter specified with the option; for example, specifying the parameter cpuinfo displays information about your CPU and indicates whether or not the JVM can determine if hyper threading is enabled. Table 2-10 lists the parameters available for the -Xverbose option.

Operation

Format: -Xverbose:<param[=level]>

Where param is one of the parameters described in Table 2-10 and level the log level, as described in Log Levels.

For Example:

java -Xverbose:gcpause=debug myClass

enables pause time sampling and information during a run and logs messages with detailed information of JRockit JVM’s behavior.

Note: To use more than one parameter, separate them with a comma; for example:
Note: -Xverbose:gc,opt

Table 2-10 -Xverbose Parameters
This Parameter...
Prints to the screen...
class
The names of classes loaded; sample output might look like this:
[INFO ][class ] Initializing bootstrap classes...
[INFO ][class ] created: # 0 java/lang/Object
(/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/rt.jar)
[INFO ][class ] 0 java/lang/Object success (0.45 ms)
[INFO ][class ] created: # 2 java/io/Serializable
(/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/rt.jar)
[INFO ][class ] 2 java/io/Serializable success (0.08 ms)
codegen
The names of each method that is being compiled. Verbose output for codegen might look like this:
[codegen] 0 : 17.9411 ms
[codegen] 0 68592131 1 java.lang.Object.unlockFatReal_jvmpi (Ljava.lang.Object;Ljava.lang.Thread;I)V: 17.94 ms
[codegen] 1 : 2.0262 ms
[codegen] 0 0 2 java.lang.Object.acquireMonitor(Ljava.lang.Object;II)I: 19.97 ms
[codegen] 2 : 4.4926 ms
[codegen] 0 10 3 java.lang.Object.unlockFat(Ljava.lang.Object;Ljava.lang.Thread;I)V: 24.46 ms
[codegen] 3 : 0.3328 ms
cpuinfo
Technical information about your CPUs. Verbose output for cpuinfo might look like this:
[cpuinfo] Vendor: GenuineIntel
[cpuinfo] Type: Original OEM
[cpuinfo] Family: Pentium 4
[cpuinfo] Brand: Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz
[cpuinfo] Supports: On-Chip FPU
[cpuinfo] Supports: Virtual Mode Extensions
[cpuinfo] Supports: Debugging Extensions
[cpuinfo] Supports: Page Size Extensions
exceptions
Displays exception types and messages (excluding the common types of exceptions). Verbose output for exceptions might look like this:
[excepti][00002] java/lang/NumberFormatException: null
exceptions=debug
Displays exception types and messages (excluding the common types of exceptions).It also displays stacktraces; Verbose output for exceptions=debug might look like this:
[excepti][00002] java/lang/NumberFormatException: null
at java/lang/Integer.parseInt(Ljava/lang/String;I)I(Integer.
java:415)
at java/lang/Integer.<init>(Ljava/lang/String;)V(Integer.
java:620)
at sun/net/InetAddressCachePolicy.<clinit>()V
(InetAddressCachePolicy.java:77)
at jrockit/vm/RNI.c2java(IIII)V(Native Method)
at jrockit/vm/RNI.generateFixedCode(I)I(Native Method)
at java/net/InetAddress.<clinit>()V(InetAddress.java:640)
at jrockit/vm/RNI.c2java(IIII)V(Native Method)
at jrockit/vm/RNI.generateFixedCode(I)I(Native Method)
at java/net/InetSocketAddress.<init>(Ljava/lang/String;I)V
(InetSocketAddress.java:124)
at java/net/Socket.<init>(Ljava/lang/String;I)V
(Socket.java:178)
at Ex.main([Ljava/lang/String;)V(Ex.java:5)
at jrockit/vm/RNI.c2java(IIII)V(Native Method)
--- End of stack trace
exceptions=trace
The same information as debug, but includes the common types of exceptions. Verbose output for exceptions=trace will look the same as -Xverbose:exceptions=debug but also prints exceptions of types:
  • java.util.EmptyStackException
  • java.lang.ClassNotFoundException
  • java.security.PrivilegedActionException
load
The name of each loaded Java or native library:
[INFO ][load ] opened zip
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/rt.jar
[INFO ][load ] opened zip
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/jsse.jar
[INFO ][load ] opened zip
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/jce.jar
[INFO ][load ] opened zip
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/charsets.jar
[INFO ][load ] Loaded native library:
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/i386/libverify.so
[INFO ][load ] Loaded native library:
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/i386/libjava.so
[INFO ][load ] Loaded native library:
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/i386/native_threads/libhpi.so
[INFO ][load ] Loaded native library:
/localhome/jrockits/R27.5.0_R27.5.0-110_1.5.0/jre/lib/i386/libzip.so
gcpause
-Xverbose:gcpause gives the same output as -XgcPause.
gcreport
-Xverbose:gcreport gives the same output as -XgcReport.
memdbg
Turns on memory printout and adds new special memdbg printouts. Verbose output for memdbg might look like this:
[memory ] 12.875: nursery GC 89648K->89716K (89716K), 3.296 ms
[memdbg ] nursery GC 291: promoted 1510 objects (69744 bytes) in 3.296 ms
[memdbg ] Page faults before GC: 36784, page faults after GC: 36800, pages in heap: 22429
[finalizer] (YC) Pending finalizers 0->0
[memdbg ] old collection 7 started
[memdbg ] Compacting 8 heap parts at index 112 (type 2) (exceptional 0)
[memdbg ] starting parallel marking phase
[memdbg ] ending marking phase [memdbg ] current generational GC work score: 0.142956
[memdbg ] last single generational GC work score: 0.081486
[memdbg ] current error: -0.042956
[memdbg ] previous nursery size: 736760
[memdbg ] requested nursery size: 711984
[memdbg ] starting parallel sweeping phase
[memdbg ] ending sweeping phase
[memory ] 11.841-12.025: GC 89716K->67088K (89716K), 184.000 ms
[memdbg ] Page faults before GC: 36827, page faults after GC: 37036, pages in heap: 22429
[finalizer] (OC) Pending finalizers 0->0
memdbg with -XgcPrio: throughput
Turns on memory printout and adds new special memdbg printouts. A report for a JVM running a dynamic garbage collector optimized for application throughput ( -XgcPrio : throughput) with memdbg specified might look like this:
[memdbg ] nursery GC 3: promoted 22788 objects (1246K) in 28.472 ms
[memdbg ] Page faults before GC: 24768, page faults after GC: 25288, pages in heap: 19170
[finaliz] (YC) Pending finalizers 0->0
[memdbg ] old collection 2 started
[memdbg ] OC reasons: Large obj: 1 (4021248 bytes), TLA: 1, Promotion: 0, GCTrigger: 1, SystemGC: 0, Other: 0
[memdbg ] Compacting 8 heap parts at index 0 (type 1) (exceptional 0)
[memdbg ] starting parallel marking phase
[memdbg ] ending marking phase
[memdbg ] current generational GC work score: 0.266484
[memdbg ] last single generational GC work score: 0.000000
[memdbg ] current error: -0.166484
[memory ] Changing GC strategy to single generation, parallel mark and parallel sweep
[memdbg ] starting parallel sweeping phase
[memdbg ] ending sweeping phase
[memdbg ] expanding the heap from 74 MB to 87 MB
[memory ] 15.882-16.157: GC 76680K->69203K (89716K), 275.413 ms
[memdbg ] Page faults before GC: 25288, page faults after GC: 25765, pages in heap: 22429
[finaliz] (OC) Pending finalizers 0->0
memory;
gc
Information about the memory management system, including:
  • Start time of collection (seconds since JVM start)
  • End time of collection (seconds since JVM start)
  • Memory used by objects before collection (KB)
  • Memory used by objects after collection (KB)
  • Size of heap after collection (KB)
  • Total time of collection (seconds or milliseconds)
  • Total pause time during collection (milliseconds)
The information displayed by -Xverbose:memory or -Xverbose:gc will vary depending upon the type of garbage collector you are using.
memory;
gc
with gencon
A report for a JVM running a generational concurrent collector (-Xgc:gencon) with memory or gc specified might look like this:
[memory ] GC strategy: gencon
[memory ] heap size: 65536K, maximal heap size: 785672K, nursery size: 16384K
[memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[memory ] <s/start> - start time of collection (seconds since jvm start)
[memory ] <end> - end time of collection (seconds since jvm start)
[memory ] <before> - memory used by objects before collection (KB)
[memory ] <after> - memory used by objects after collection (KB)
[memory ] <heap> - size of heap after collection (KB)
[memory ] <pause> - total pause time during collection (milliseconds)
[memory ] 1.069: parallel nursery GC 24995K->24810K (65536K), 40.038 ms
[memory ] 1.535: parallel nursery GC 46818K->46701K (65536K), 31.319 ms
[memory ] 8.698-9.247: GC 48085K->46437K (65536K), 230.190 ms
[memory ] 9.252-9.915: GC 49055K->55834K (76680K), 216.105 ms
[memory ] 9.928: parallel nursery GC 63287K->63287K (76680K), 20.282 ms
memory; gc
with singlecon
A report for a JVM running a single generation concurrent collector (-Xgc:singlecon) with memory or gc specified might look like this:
[memory ] GC strategy: singlecon
[memory ] heap size: 65536K, maximal heap size: 785672K
[memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[memory ] <s/start> - start time of collection (seconds since jvm start)
[memory ] <end> - end time of collection (seconds since jvm start)
[memory ] <before> - memory used by objects before collection (KB)
[memory ] <after> - memory used by objects after collection (KB)
[memory ] <heap> - size of heap after collection (KB)
[memory ] <pause> - total pause time during collection (milliseconds)
[memory ] 30.220-30.693: GC 65058K->55006K (76680K), 101.591 ms
[memory ] 30.749-31.290: GC 76680K->73168K (89716K), 90.350 ms
[memory ] 31.297-31.904: GC 79089K->89716K (104968K), 2.386 ms
memory;
gc
with parallel
A report for a JVM running a parallel collector (-Xgc:parallel) with memory or gc specified might look like this:
[memory ] GC strategy: parallel
[memory ] heap size: 65536K, maximal heap size: 785672K
[memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[memory ] <s/start> - start time of collection (seconds since jvm start)
[memory ] <end> - end time of collection (seconds since jvm start)
[memory ] <before> - memory used by objects before collection (KB)
[memory ] <after> - memory used by objects after collection (KB)
[memory ] <heap> - size of heap after collection (KB)
[memory ] <pause> - total pause time during collection (milliseconds)
[memory ] 1.563-1.805: GC 65536K->55018K (76680K), 242.030 ms
[memory ] 1.871-2.114: GC 76680K->73161K (89716K), 242.675 ms
[memory ] 2.167-2.478: GC 89716K->86478K (104968K), 310.974 ms
memory;
gc
with -Xgcprio: throughput
A report for a JVM running a dynamic garbage collector optimized for application throughput (-XgcPrio:throughput) with memory or gc specified might look like this:
[memory ] GC strategy: System optimized over throughput (initial strategy singleparpar)
[memory ] heap size: 65536K, maximal heap size: 785672K
[memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[memory ] <s/start> - start time of collection (seconds since jvm start)
[memory ] <end> - end time of collection (seconds since jvm start)
[memory ] <before> - memory used by objects before collection (KB)
[memory ] <after> - memory used by objects after collection (KB)
[memory ] <heap> - size of heap after collection (KB)
[memory ] <pause> - total pause time during collection (milliseconds)
[memory ] Changing GC strategy to generational, parallel mark and parallel sweep
[memory ] 1.669-1.904: GC 65536K->54455K (76680K), 234.978 ms
[memory ] 1.923: parallel nursery GC 66150K->67136K (76680K), 105.995 ms
[memory ] 2.039: parallel nursery GC 71236K->71203K (76680K), 58.620 ms
[memory ] 2.107: parallel nursery GC 75303K->76680K (76680K), 36.650 ms
[memory ] Changing GC strategy to single generation, parallel mark and parallel sweep
[memory ] 2.164-2.482: GC 76680K->69340K (89716K), 318.158 ms
opt
Information about all methods that get optimized. Verbose output for opt might look like this:
[opt ] 280 2434 0 ObjAlloc.main([Ljava.lang.String;)V: 0.00 ms
[opt ] 0 : 9.8996 ms
referents
The reference objects for each old generation garbage collection and the reference to which they point. -Xverbose:referents corresponds to the option -Djrockit.verboserefs in earlier JRockit JVM versions, prior to R27.2.
Each reference type is broken down by reference class and referent. In the case of handles, only referents are shown; there are no references. The different counters tell how many instances of each type exists and how they are reachable (or cleared).
The header/footer of the report informs what type of collection took place, how long ago the last old collection happened and how much memory that was free at that time is reported. If any soft references are present the user is told which softly reachable referents are collected based on when they where last looked up through get().
The performance overhead of this log module is high.
refobj
Information on reference objects and handles at each garbage collection. At info level the output is a summary of reference objects of different types and how many of them are “activated”. A reference object is activated when the reachability requirements for the reference object type are fulfilled. Upon activation, the memory management system can clear the reference, enqueue it in a reference queue or enqueue it for finalization, depending on the type of reference.
At debug level this module displays an improved version of the information previously displayed by -Xverbose:referents.
The performance overhead of this log module is low on info level. On debug level, the performance overhead is high.
This module is available in JRockit JVM R27.5 and later versions.
stackoverflow
Stack overflow errors as they occur. This output will typically be several pages long with the same information repeated ad nauseum.This is because, if the stack overflows, the stack trace will be extremely long and this parameter will cause the entire long stacktrace to print.
starttime
The values of System.currentTimeMillis() and System.nanoTime() at the time JRockit JVM started. These can be used to correlate log output between different processes. Verbose output for starttime might look like this:
[startti] VM start time: 1152871839957 millis 171588375730523 nanos
Where:
  • millis is the number of milliseconds elapsed since midnight, January 1, 1970 UTC. This is same value that System.currentTimeMills() would render.
  • nanos measures time to the resolution of one-billionth of a second (a nanosecond); however, the time from which nanoTime() is measured (the start time) is unspecified so that the most efficient method of measurement for different operating systems can be used. It is the same value that System.nanoTime() would render.
systemgc
Notifies of garbage collections started by a call to System.gc() or for a reason marked as “other” in JRA recordings and -Xverbose:memdbg outputs, for example a call to a JMAPI function that implicitly starts a garbage collection or to the diagnostics command runsystemgc.
A garbage collection started by a direct call to System.gc() will result in a verbose output similar to:
[INFO ][sysgc ] GC requested by thread 1
The thread number in this output is the thread ID of the thread that requests the garbage collection.
The output for a garbage collection started by other means will have the reason for the garbage collection printed out, for example:
[INFO ][sysgc ] GC triggered for reason: Set Nursery Size

Note: In JRockit JVM R27.3 and older versions, all the -Xverbose:systemgc outputs look the same. Furthermore, some of the garbage collections printed by -Xverbose:systemgc and treated as “other” were not printed out.

timing
The timer resolution and, on Linux, the method used to get a time value. This is the resolution of the timer used by the System.nanoTime() method.
Here is an example of a verbose timing report on Windows:
[INFO ][timing ] Counter timer using resolution of 1779720000Hz
verboserefs
Gives the same output as referents.

Log Levels

Log levels identify the levels of information recorded in the log. JRockit JVM uses six logging levels, as described in Table 2-11.

Table 2-11 -Xverbose Log Levels
Log Level
Description
quiet
No logging. No messages or errors are generated.
error
Only error messages are logged.
warn
Warning messages are logged along with errors. Still a low logging level, warn is usually used to warn about events that could possibly lead to an error later on.
info
At the info level, not only are errors and warnings logged, but also informational messages about the current state of JRockit JVM and various JVM events. This is the default logging level if -Xverbose is used without arguments.
debug
debug logs messages with detailed information of JRockit JVM’s behavior. Ususally, debug provides too much information for day to day logging, but useful for debugging.
trace
trace provides very verbose logging. This level is used by modules where even the debug level would be cluttered by the amount of information generated. Typically, trace is used when up to ten or one hundred pages of text per minute needs to be logged.

Other Flags and Options Affected

-Xverbose must be set for the following options to work:

Exceptions

None

 


-XverboseDecorations

Use this option to set the “decorations” JRockit JVM adds to verbose printouts. Decorations are additional information—usually system-related—used to enhance the meaningfulness of verbose output; for example, the name of the module in which the message originated or number of milliseconds elapsed since the current JRockit JVM session started.

Operation

Format: -Xverbosedecorations=<decoration names>

For Example:

If you include:

java -Xverbose:gcpause -XverboseDecorations=timestamp,module myApp

at startup, the output will include these decorations:

Note: You can also use the control-break handler verbosity with the argument decorations.

The possible decorations are listed in Table 2-12.

Table 2-12 Verbose Output Decorations
Decoration
Description
level
Prints the logging level for the message.
millis
Prints the number of milliseconds elapsed since midnight, January 1, 1970 UTC. This is same value that would be generated by System.currentTimeMills().
millisstart
Prints the number of milliseconds elapsed since JRockit JVM started.
module
Prints the module in which the message originated, same as the arguments to -Xverbose.
nanos
Prints the same value that System.nanoTime() would render. “nanoTime” measures time to the resolution of one-billionth of a second (a nanosecond); however, the time from which nanoTime() is measured (the start time) is unspecified so that the most efficient method of measurement for different operating systems can be used.
nanosstart
Prints the number of nanoseconds since JRockit JVM started.
pid
Prints the process ID.
threadid
Prints the thread's index. This is the same value provided by idx in thread dumps.
timestamp
Prints a human readable timestamp. This is the same value you would receive if you used the -XverboseTimeStamp option.

Default Value

If you use -XverboseDecorations without specifying a decoration, the verbose output will display the module, timestamp, and pid (in that order); for example:

D:\jrockits\R27.1.0_R27.1.0-23_1.4.2\bin>java -Xverbose:load -Xverbosedecorations -cp L:\src\ HelloWorld
[load ][Wed Sep 13 19:43:14 2006][00728] opened zip D:\jrockits\R27.1.0_R27.1.0-23_1.4.2\jre\lib\rt.jar

Flags or Other Options Affected

This option can only be used if -Xverbose is also set, as that option turns on verbose logging.

Exceptions

None

 


-XverboseLog

This option sends messages (such as verbose output and error messages) from the Oracle JRockit JVM to the specified file instead of stderr.

Operation

Format: -Xverboselog:myFile.txt

When this command is used with a filename and extension (for example, myFile.txt), the JVM will write any logging information to the specified file.

For Example:

java -Xverbose:gcpause -Xverboselog:verboseText.txt myApp

writes verbose logging information for the class myApp to a file called verboseText.txt

Flags or Other Options Affected

This option can only work if -Xverbose is set, as that option turns on verbose logging.

Exceptions

This option does not print to screen.

 


-XverboseTimeStamp

This option adds a timestamp to the verbose printout, which can be useful when logging events.

Operation

Format: -XverboseTimeStamp

You can force a timestamp to print out with other information generated by -Xverbose if you combine it with the command -XverboseTimeStamp.

For Example:

java -Xverbose -XverboseTimeStamp myApp

The printout generated by -XverboseTimeStamp will precede the information printed by -Xverbose, as shown here:

L:\src>D:\jrockits\R27.1.0_R27.1.0-13_1.4.2\bin\java -Xverbose
-XverboseTimeStamp HelloWorld
[load ][Mon Sep 25 09:57:56 2006][00624] opened zip
D:\jrockits\R27.1.0_R27.1.0-13_1.4.2\jre\lib\rt.jar

Flags or Other Options Affected

This option is only effective if verbose logging is enabled either by using -Xverbose or by enabling it at runtime.

Exceptions

None

 


-Xverify

This option allows you to manually verify the correctness of the bytecode. By performing these checks once at class loading time, as opposed to repeatedly during execution, this option helps improve runtime efficiency.

Operation

Format: -Xverify:<param>

Combine this option with one of the parameters described in Table 2-13.

Table 2-13 -Xverify Parameters
<param>
Description
none
Will not verify the bytecode. Note that, while using this parameter can lessen start-up time, you will lose some of the protection provided by Java.
remote
Verify just those classes loaded over network.
all
Verify all classes/

Default Value

If you don’t use this option, the default is to verify just those classes loaded over the network (-Xverify:remote).

Other Flags or Options Affected

None

Exceptions

None


  Back to Top       Previous  Next