Command-Line Options
Sun Java Real-Time System 2.2
  

This document presents information about the -XX command-line options (parameters) that are specific to Sun Java™ Real-Time System (Java RTS) 2.2 virtual machine. For a list of the -XX options for the Java HotSpot™ Virtual Machine, see Java HotSpot VM Options.

Technical Documentation: Links to all the Java RTS technical documents


Introduction

The -XX:+<flag> syntax sets a boolean flag to true, and -XX:-<flag> sets it to false. For parameters that take values, the syntax is -XX:<param>=<value>.

These parameters are intended for either a production or a development environment, as indicated in the "Env" column. Development parameters are available only to the debug version of the virtual machine (that is, java_g). Note that certain development parameters might produce I/O that can change the temporal behavior of the VM.

Caution: Options that are specified with "-XX" are not stable and are not recommended for casual use. These options are not part of the official Java API and are subject to change without notice from one Java RTS release to the other.

The Java RTS command-line options are grouped into the following categories:


Memory-Related Parameters

Parameter

Default
32/64-bit

Env

Description

ImmortalSize

32M/64M

prod

The amount of immortal memory to allocate.

ScopedSize

16M/32M

prod

The total amount of memory for all scoped memory allocations.

ScopedMemoryAllocGrain

16K

prod

The minimum size ScopedMemory area that will be allocated. The value should be a power of two, and if not, it will be rounded down to a power of two.

RTSJTraceScopeStacks

false

dev

Enable tracing of scope stacks. Stacks are printed on changes.

RTSJEnableImmortalAllocationProbe

true

prod

Enable the immortal-alloc probe of the jrts DTrace probe provider. This probe fires when immortal memory is allocated. See the Java RTS DTrace Provider document.

RTSJShowHeapLayout

false

prod

Show the memory layout.

RTSJLockPagesInMemory

true

prod

Lock pages in memory to avoid swapping to disk. See Memory Locking section in the Technical Information Guide for more details.

Back to top


Thread-Related Parameters

Parameter

Default

Env

Description

RTSJTraceThreading

false

dev

Trace (print) real-time thread scheduling events, such as thread start and death, priority modification or boost, blocking on lock, waiting.

RTSJTraceThreadBinding

false

prod

Trace the binding of threads to processors.

RTSJBindNHRTToProcessorSet

(Solaris OS only)

N/A

prod

Bind NHRTs to the processor set whose ID is specified by the value of the parameter.

RTSJBindRTTToProcessorSet

(Solaris OS only)

N/A

prod

Bind RTTs to the processor set whose ID is specified by the value of the parameter.

RTSJBindNHRTToProcessors

(Linux only)

N/A

prod

Bind NHRTs to the specified comma-separated list of processors or to the specified cpuset.

RTSJBindRTTToProcessors

(Linux only)

N/A

prod

Bind RTTs to the specified comma-separated list of processors or to the specified cpuset.

RTSJForceCyclic

(Used only with non-real-time applications.)

(Solaris OS only)

Use driver if available; otherwise, fall back to built-in support.

prod

Force or prevent usage of the cyclic device driver when running non-real-time applications.

  • Default (no value specified): Use driver if available; otherwise, fall back to built-in support.

  • Value = true: Use driver if available; otherwise, exit.

  • Value = false: Do not use driver. Use built-in support instead.

VMStackTraceAtRTSJException

false

dev

Print stack trace information for an RTSJ-specific exception.

Back to top


Access-Related and Assignment Check-Related Parameters

Parameter

Default

Env

Description

RTSJTraceAccessChecks

false

dev

Enable tracing of access checks. Illegal accesses are reported. (Used only in interpreted mode.)

RTSJTraceAssignmentChecks

false

dev

Enable tracing of assignment checks. Illegal assignments are reported. (Used only in interpreted mode.)

RTSJIgnoreThrowBoundaryError

false

dev

Let an exception escape its scope instead of replacing it. This allows the developer to dump the stack trace. (See Caution note below.)

Caution: If you activate the RTSJIgnoreThrowBoundaryError flag, do so only temporarily to obtain information that is hidden because of the replacement of an exception by a ThrowBoundaryError. Activation of this flag might lead to core dumps or other undefined behavior since the concerned object might be deleted while it is still in use. Always disable this option before making a bug report.

Back to top


Asynchrony-Related Parameters

Parameter

Default

Env

Description

RTSJSignalThreadPriority

RTSJMaxPriority

prod

Priority of the thread handling POSIX signals.

See the section "Handlers Released by System Threads" in the Java RTS Technical Information document.

RTSJForceHighResTimer

(Solaris OS only)

Use high-resolution timers if available; otherwise, fall back to regular, low-resolution timers.

prod

Force usage of the high-resolution timers.

  • Default (no value specified): Use high-res timers if available; otherwise, fall back to low-res timers.

  • Value = true: Use high-res timers if user has privileges; otherwise, exit.

  • Value = false: Do not use high-res timers. Use low-res timers instead.

RTSJHighResTimerThreadPriority

RTSJMaxPriority

prod

Priority of the thread releasing handlers associated with timers.

See the section "Handlers Released by System Threads" in the Java RTS Technical Information document.

RTSJDeadlineMonitoringThreadPriority

RTSJMaxPriority

prod

Priority of the system thread responsible for deadline monitoring.

See the section "Handlers Released by System Threads" in the Java RTS Technical Information document.

RTSJInitialNumberOfRealtimeServerThread

2

prod

The initial number of server threads created to serve heap-using AsyncEventHandler instances.

RTSJMaxNumberOfRealtimeServerThread

100

prod

The maximum number of server threads created to serve heap-using AsyncEventHandler instances. If there are more released handlers than server threads then handlers will have to wait for a server thread to become available.

RTSJInitialNumberOfNoHeapRealtimeServerThread

2

prod

The initial number of server threads created to serve no-heap AsyncEventHandler instances.

RTSJMaxNumberOfNoHeapRealtimeServerThread

100

prod

The maximum number of server threads created to serve no-heap AsyncEventHandler instances. If there are more released handlers than server threads then handlers will have to wait for a server thread to become available.

Back to top


Compiler-Related Parameters

The table below summarizes the command-line parameters that are used to control the compilation options for the various thread types.

See the Java RTS Compilation Guide for a detailed description of how to use these options.

Parameter

Default

Env

Description

ITCJLT

false

prod

When true, the ITC policy applies to all java.lang.Thread instances:

  • Methods in the precompile list are compiled at class initialization.
  • All other methods are JIT compiled.

When false, all java.lang.Thread instances execute code compiled in JIT mode.

ITCRT

true

prod

When true, the ITC policy applies to all javax.realtime.RealtimeThread instances:

  • Methods in the precompile list are compiled at class initialization.
  • All other methods are JIT compiled if the JITRT flag is on, or interpreted if the JITRT flag is off.

When false, all RealtimeThread instances execute code compiled in JIT mode if the JITRT flag is on, or interpreted code if the JITRT flag is off.

ITCNHRT

true

prod

When true, the ITC policy applies to all javax.realtime.NoHeapRealtimeThread instances:

  • Methods in the precompile list are compiled at class initialization.
  • All other methods are interpreted.

When false, all NoHeapRealtimeThread instances execute interpreted code.

JITRT

true

prod

When true, RealtimeThread instances execute code compiled in JIT mode, except for methods in the precompile list.

When false, RealtimeThread instances execute interpreted code, except for methods in the precompile list.

BackgroundCompilation

true

prod

When true, enable background (asynchronous) JIT compilation.

When false, disable background (asynchronous) JIT compilation. This option enables synchronous compilation. This mode is not recommended when the RTGC is used.

RTSJBuildCompilationList

false

prod

Instruct the VM to generate a file containing all the methods that were executed (compiled or interpreted) by a thread whose execution policy is ITC.

CompilationList

nhrt.precompile

prod

Name of the file containing the results from the RTSJBuildCompilationList option.

RTSJBuildClassInitializationList

false

prod

Instruct the VM to generate a file containing all the classes that are referenced during the compilation of methods at initialization. Classes appear in the order in which they were initialized during the test run.

PreInitList

itc.preinit

prod

Name of the file containing the results from the RTSJBuildClassInitializationList option.

UseITC

false

prod

Force the automatic generation and use of the precompile and preinit lists, using the default file names. When true, this option is the equivalent of specifying the following four options on the command line.

  • RTSJBuildCompilationList
  • RTSJBuildClassInitializationList
  • CompilationList=nhrt.precompile
  • PreInitList=itc.preinit

PrintCompilation

false

prod

Log JIT-compilation of methods.

PrintITCWarnings

false

prod

Print ITC-related warnings that occur during processing of class and method lists.

Back to top


Optimization Parameters

The Java RTS virtual machine can be configured to run with or without the Real-Time Garbage Collector (RTGC). If the RTGC is not used, then the default HotSpot serial collector is used. (The RTGC is enabled by default but can be disabled with the command-line parameter -XX:-UseRTGC.)

Java RTS provides the following command-line options to control the use of a set of optimizations that impact the trade-off between throughput and determinism. See the Java RTS Compilation Guide for a detailed description of how to use these options.

Parameter

Default

Env

Description

UseCHA

true

prod

Use virtual method call inlining. If an inlining is invalidated because of dynamic class loading, the code is deoptimized.

JLTCHA

true with RTGC

(NA with Serial GC)

prod

For java.lang.Threads (JLTs) only, use virtual method call inlining when the RTGC is enabled.

(This option is not applicable with the Serial GC.)

RTTCHA

true with RTGC

(NA with Serial GC)

prod

For RealtimeThreads (RTTs) only, use virtual method call inlining when the RTGC is enabled.

(This option is not applicable with the Serial GC.)

UseInlineCaches

true with Serial GC

(NA with RTGC)

prod

Use inline caches when Serial GC is enabled.

(This option is not applicable when the RTGC is enabled.)

RTSJUseInlineCaches

true with RTGC

(NA with Serial GC)

prod

Use inline caches when RTGC is enabled.

(This option is not applicable when the Serial GC is enabled.)

Back to top


Real-Time Garbage Collector-Related Parameters

The following command-line options can be used to tune the activity of the Real-Time Garbage Collector (RTGC). These options are categorized by the level of RTGC configuration that might be needed, depending on application requirements: basic, advanced, and expert.

See the Java RTS Garbage Collection Guide for a detailed description of how to use these options.

RTGC Basic Options

Parameter

Default

Env

Description

RTGCCriticalReservedBytes

0

prod

Free memory threshold, in bytes, under which only critical threads can allocate memory. To guarantee determinism, configure this parameter. See "Tuning the RTGC" in the Java RTS Garbage Collection Guide.

RTGCCriticalBoundary

OS-dependent

prod

The priority boundary between critical and non-critical threads. Threads with priority above this boundary are considered to be critical threads, while threads with priority at this boundary or below are non-critical threads. The value defaults to the middle of the real-time range, which is greater than the default priority for real-time threads. This default value is OS-dependent, as explained in "Real-Time Priorities" in the Technical Information document.

PrintGC

false

prod

Print information gathered whenever the GC runs.

UseRTGC

true

prod

Use the new real-time garbage collector instead of the non-real-time, serial collector.


RTGC Advanced Options

Parameter

Default

Env

Description

RTGCNormalPriority

11

prod

Normal priority for the RTGC. It defaults to 11 to try to offer soft real-time behavior for all the real-time threads.

RTGCNormalWorkers

(available CPUs) / 2

prod

Initial number of parallel RTGC worker threads.

RTGCBoostedWorkers

(available CPUs) / 2

prod

Boosted number of parallel RTGC worker threads.

The number of CPUs available to the RTGC is the number of CPUs available to the VM that have not been specifically assigned to running RealtimeThread or NoHeapRealtimeThread instances. The minimum possible value is one.

RTGC Expert Options

Parameter

Default

Env

Description

RTGCPrintStatistics

false

prod

Print additional information gathered whenever the RTGC runs, for advanced tuning or debugging.

RTGCWaitDuration

10

prod

Number of milliseconds between two consecutive runs of the RTGC, unless memory is exhausted or an explicit GC is requested.

UseAnalyticalPolicy

true

prod

When true, use analytical auto-tuning (using statistics) for normal mode.

When false, use "sliding value" auto-tuning for normal mode.

RTGCTuneBoostedMode

false

prod

When true, turn on auto-tuning ("sliding value") for boosted mode.

RTGCBoostedPriority

RTGCCriticalBoundary

prod

Priority at which the RTGC activity should execute in order to guarantee determinism. When free memory falls below the boosted memory threshold, the RTGC priority is boosted to this level. If this parameter is not specified, then its default value is the value of the RTGCCriticalBoundary parameter.

The following expert-level options are used by both the analytical and the "sliding value" auto-tuning mechanisms for normal mode.

Parameter

Default

Env

Description

RTGCTargetedMinFreePercent

5

prod

Minimum free memory level targeted by auto-tuning to start the RTGC in normal mode. The value is expressed as a percentage of the heap.

RTGCInitialMinFreePercent

30

prod

Initial free memory level used by auto-tuning to start the RTGC in normal mode. The value is expressed as a percentage of the heap.

RTGCInitialDecreaseFactor

50

prod

In auto-tuning, the percentage by which to decrease the value of RTGCInitialMinFreePercent at the end of each GC cycle.

NormalMinFreeBytes

0

prod

Minimum (estimated) free heap memory level, in bytes, below which the RTGC should start its next cycle, at priority RTGCNormalPriority.

The following expert-level options are used by the "sliding value" auto-tuning mechanism for normal mode.

Parameter

Default

Env

Description

NormalSlideFactor

20

prod

Speed at which allocation bursts are forgotten in normal mode. An integer from 0 to 100, which will be converted to a percentage.

NormalSafetyMargin

10

prod

Variation of the allocation rate that is accepted without creating jitter in normal mode. An integer from 0 to 100, which will be converted to a percentage.

The following expert-level options are used by the "sliding value" auto-tuning mechanism for boosted mode.

Parameter

Default

Env

Description

BoostedMinFreeBytes

0

prod

Minimum (estimated) free heap memory level, in bytes, below which the RTGC should be boosted to priority RTGCBoostedPriority.

BoostedSlideFactor

10

prod

Speed at which allocation bursts are forgotten in boosted mode. An integer from 0 to 100, which will be converted to a percentage.

BoostedSafetyMargin

20

prod

Variation of the allocation rate that is accepted without creating jitter in boosted mode. An integer from 0 to 100, which will be converted to a percentage.

Back to top


DTrace Provider-Related Parameters (Solaris OS Only)

The table below summarizes the command-line parameters that are used in conjunction with the jrts DTrace Provider.

See the Java RTS DTrace Provider Guide for a detailed description on how to use these options.

Parameter

Default

Env

Description

PauseAtStartup

false

prod

Instructs the VM to pause execution until after the file specified by PauseAtStartupFile has been deleted.

PauseAtStartupFile

vm.paused.<pid_of_paused_vm>

prod

The file used in conjunction with PauseAtStartup.

RTSJEnableImmortalAllocationProbe

true

prod

Enable the immortal-alloc probe of the jrts DTrace probe provider. This probe fires when immortal memory is allocated.

RTSJEnableInterpreterMethodEntryProbe

false

prod

Enable the interpreting-method probe of the jrts DTrace probe provider. This probe fires when a thread starts executing a method using the interpreter.

Back to top


Other Parameters

Parameter

Default

Env

Description

RTSJEnableServerThreadNamingProbe

false

prod

Activate the firing of the thread-set-name probe during the binding and unbinding process.

RTSJDisableAtomicThreadDump

true

prod

Disable the suspension of execution. Set to true in prod enviroment. When this parameter is set to false, Java RTS suspends application execution in order to obtain thread stack information (for debugging in dev environment).

RTSJNumRTPrio

OS-dependent

prod

The number of real-time priorities used by Java RTS. See explanation in "Real-Time Priorities" in the Technical Information document.

VMStackTraceAtRTSJException

false

dev

Print a VM stack trace when an RTSJ exception occurs.

RTSJIgnoreThrowBoundaryError

false

dev

Use this parameter only temporarily to obtain information that is hidden because of the replacement of an exception by a ThrowBoundaryError. Caution: Activation of this flag might lead to core dumps or other undefined behavior since the concerned object might be deleted while it is still in use.

LogJitterProneEvents

false

prod

Produce a file named hs_jitter_pid<pid>.log containing several time-stamped events, including class initialization, method interpretation, failed allocation for a critical thread, etc. See "Command-Line Options" section in the Tools, Tuning, and Troubleshooting Guide.

Back to top

Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.