To run your Java program in 100% interpreted mode, you can specify -Xint
on your command line. To make the JIT behaive more deterministically, use the -Xbatch flag.
-Xbatch
Disable background compilation. Normally the VM will compile the
method as a background task, running the method in interpreter mode
until the background compilation is finished. The -Xbatch flag
disables background compilation so that compilation of all methods
proceeds as a foreground task until completed.
In principal, I agree with Steve J's response above - however - you may wish to collect information on unoptimized code for comparison.