The basic model is simple. At a nominated time in the execution of a program, all methods specified in the .ca advice file will be (re)compiled with the compiler and optimization level nominated in the advice file. Broadly, there are two ways of initiating bulk compilation: a) by calling the method method
org.jikesrvm.adaptive.recompilation.BulkCompile.compileAllMethods() during during execution, and b) by using the the
-X:aos:enable_precompile=true flag at the command line to trigger bulk compilation at boot time. A standard methodology is to use a benchmark harness call back mechanism to call
compileAllMethods() at the end of the first iteration of the benchmark. At the time of writing this gave performance roughly 2% faster than the 10th iteration of regular adaptive compilation. Because precompilation occurs early, the compiler has less information about the classes, and in consequence the performance of precompilation is about 9% slower than the 10th iteration of adaptive compilation.
For 'warmup' replay (where orgwhere
org.jikesrvm.adaptive.recompilation.BulkCompile.compileAllMethods() is is called at the end of the first iteration):
For precompile replay (where bulk compilation occurs at boot time):
You can alter the verbosity of the replay behavior with the flag
-X:aos:bulk_compilation_verbosity, which by default (0) is silent, but will produce more information about the recompilation with values of 1 or 2.
Measuring GC performance
MMTk includes a statistics subsystem and a harness mechanism for measuring its performance. If you are using the DaCapo benchmarks, the MMTk harness can be invoked using the '-c MMTkCallback' command line option, but for other benchmarks you will need to invoke the harness by calling the static methods