Java Reference
In-Depth Information
Table A-9. Miscellaneous JVM flags
Flag
What it does
When to use it
See also
Revert the Java 7 parallel
classloading scheme to
the Java 6 nonparallel
scheme.
On large systems loading classes in
only a single thread, startup per-
formance may slightly benefit by
using this flag.
Classloading
-
XX:+AlwaysLockClassLoader
Prevents the stack trace
from being gathered
whenever an exception is
thrown.
On systems with very deep stacks
where exceptions are frequently
thrown (and where fixing the code
to throw fewer exceptions is not a
possibility).
Exceptions
-XX:-StackTraceInThrow-
able
Allows non-JDK code to
use the @Contended annota-
tion.
Set this if application code uses the
@Contended annotation to pad vari-
ables to prevent false sharing.
The @Conten-
ded Annotation
-XX:-RestrictContended
Disables JDK code from
using the @Contended an-
notation.
This should likely be left enabled.
Disabling may save a small amount
of space in certain JDK classes.
The @Conten-
ded Annotation
-XX:-EnableContended
Enables certain optimiza-
tions for the JVM. These
optimizations are likely to
become defaults in future
releases.
You can test with this flag to de-
termine if it helps, but be aware
that it may not work the same when
JVM versions change.
AggressiveOpts
-XX:+AggressiveOpts
Search WWH ::




Custom Search