Usage of shuJIT

last-modified: Jul 12 14:05 2001 JST

This page explains the method of installation and usage.

Installation (to JDK 1.2 and later)

Place the shared library libshujit.so on the following path:
<JDK installation path>/jre/lib/i386/

Installation (to JDK 1.1.X)

Place the shared library libshujit.so on any path in the followings.

Usage

There are some methods to utilize JIT compiler.

Specify an option to java, jre command.

Give the option
-Djava.compiler=shujit
i.e. type
% java -Djava.compiler=shujit <your class name>

Set environment variable.

We can avoid typing a long command such as -Djava... by setting an environment variable JAVA_COMPILER to `shujit'.

If you use C shell compliants (csh, tcsh), type

% setenv JAVA_COMPILER shujit
If you use bourne shell compliants (sh, ksh, zsh), type
% export JAVA_COMPILER=shujit
We can write this configuration in run command file of your shell (ex. .cshrc, .bashrc, .profile).

Confirmation of running

We'll see this message if the JIT compiler runs:
  shuJIT  for Sun Classic VM/x86  by Kazuyuki Shudo

Options to shuJIT

The JIT compiler receives options via an environment variable JAVA_COMPILER_OPT. Options can be concatenated with comma`,'.

The following options is provided.

quiet
The JIT compiler don't show start up message `shuJIT ...'.
igndisable
Ignore java.lang.Compiler#disable(), enable() which stop and resume compiling.
outcode
JIT writes generated native code of each methods to the file `code-<class_name>#<method_name>.S'.
You can assemble (gcc -c foo.S) and disassemble (objdump -d foo.o) to see assembly code.
codesize
JIT writes numeral attributes, the number and the size of bytecode instructions and the size of generated code, to the file `jit_codesize'
cmplatload
All methods of a class is compiled when the class is loaded into the JVM.
cmplclinit
Compile class initializers (ex. static {...}) which aren't compiled usually.
systhreshold=<a decimal number> (0.7.0 and posterior)
Compile the method which is provided by JDK when it is called $lt;a number$gt; times.
The default value is 10.
userthreshold=<a decimal number> (0.7.0 and posterior)
Compile the method which is provided by users when it is called $lt;a number$gt; times.
The default value is 1.
inlinemaxlen=<a decimal number>
Inline the method if it is shorter than this value. This value is expressed in the length of internal instructions, which is about the number of bytecode instructions + 5 or 6 + something. The default value is 20.
inlinedepth=<a decimal number>
The depth where recursive inlining is performed. The default value is 2.
ignstrictfp
Ignore strictfp modifiers. Every floating-point calculation is not FP-strict.
Default behavior of shuJIT is considering strictfp modifiers.
frcstrictfp
Force strictfp semantics on every method.
sched_fifo
Set the scheduling policy of the JVM process as FIFO (SCHED_FIFO).
cf. % man sched_setscheduler
sched_rr
Set the scheduling policy of the JVM process as round robin (SCHED_RR).
codedb
Save compiled codes in a database file named shujit-code.{db,page},
and restore the saved codes into JVM instead of compilation.

Back to


Copyright (C) 1998,1999,2000,2001 Kazuyuki Shudo
<shudo at computer.org>