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

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 either for a production environment 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:

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.

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, along with a
safepoint mechanism for both standard java.lang.Threads (JLTs) and
RealtimeThreads (RTTs).
(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 performance
and determinism.

Parameter

Default

Env

Description

UseInlineCaches

true with Serial GC

false with RTGC

prod

Use HotSpot's original implementation of inline caches.

RTSJUseInlineCaches

false with Serial GC

true with RTGC

prod

Use a variant of the above that does not attempt to reclaim IC stubs
so as to avoid the use of safepoint.

UseCHA

true with Serial GC

false with RTGC

prod

Use HotSpot's original implementation of virtual method inlining.
If an inlining is invalidated because of dynamic class loading, the code is de-optimized.

RTSJUseGuardedCHA

false with Serial GC

true with RTGC

prod

Use virtual method inlining that does not require de-optimization.

The following table summarizes the thread types for which a
particular optimization can be enabled or not, depending on whether or
not RTGC is used.
In the table, "Y" means that the optimization can be enabled for that
thread type, and "N" indicates that it cannot.

"(Y)" means that the
optimization can be enabled but it does not provide any benefit
compared to
another optimization that can be enabled in the same situation. For
example, using RTSJUseGuardedCHA for JLT or RTT
(with Serial GC) does not provide any additional benefit because UseCHA can
be used
for these thread types when not using RTGC.

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
presented at three levels of user experience and need: basic, advanced, and expert.

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

0

prod

Initial number of parallel RTGC worker threads. 0 means no
limit. 1 is for non-parallel RTGC.

RTGCBoostedWorkers

0

prod

Boosted number of parallel RTGC worker threads. 0 means no
limit. 1 is for non-parallel RTGC.

RTGC
Expert Options

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.

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 supported
without creating jitter in boosted mode. An integer from 0 to 100, which will be converted to a percentage.

NormalMinFreeBytes

0

prod

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

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 supported
without creating jitter in normal mode. An integer from 0 to 100, which will be converted to a percentage.

RTGCWaitDuration

10

prod

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

Other Parameters

Parameter

Default

Env

Description

RTSJEnableServerThreadNamingProbe

false

dev

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

RTSJDisableAtomicThreadDump

true

dev

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).

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.