Java Reference
In-Depth Information
Table A-1. Flags to tune the just-in-time compiler
Flag
What it does
When to use it
See also
Chooses the
server compiler.
For long-running applications that need fast
performance.
Hot Spot
Compilation
-server
Chooses the cli-
ent compiler.
For applications where startup is the most
important factor.
Hot Spot
Compilation
-client
Uses tiered
compilation
(both client and
server).
For applications where you want the best
possible performance and have enough
available native memory for the extra com-
piled code.
Hot Spot
Compilation
-XX:+TieredCompilation
Reserves space
for code com-
piled by the JIT
compiler
When you see a warning that you are out of
code cache, and generally when using tiered
compilation.
Tuning the
Code Cache
-
XX:ReservedCodeCacheSize= <MB>
-XX:InitialCodeCacheSize= <MB> Allocates the
initial space for
code compiled
by the JIT com-
piler.
If you need to preallocate the memory for
the code cache, which is very uncommon.
Tuning the
Code Cache
Sets the number
of times a meth-
od or loop is ex-
ecuted before
compiling it.
When using the server compiler, this can
cause more methods to be compiled, and
methods to be compiled sooner. The first
case is sometimes an advantage if you aren't
using tiered compilation.
Compilation
Thresholds
-XX:CompileThreshold= <N>
Provides a log
of operations by
the JIT com-
piler.
When you suspect an important method isn't
being compiled, or are generally curious as
to what the compiler is doing.
Inspecting
the Compil-
ation Pro-
cess
-XX:+PrintCompilation
Sets the number
of threads used
by the JIT com-
piler.
When using tiered compilation and too
many compiler threads are being started
(particularly on large machines running mul-
tiple JVMs).
Compilation
Threads
-XX:+CICompilerCount= <N>
Search WWH ::




Custom Search