org.jikesrvm.adaptive.recompilation
Class BulkCompile

java.lang.Object
  extended by org.jikesrvm.adaptive.recompilation.BulkCompile
All Implemented Interfaces:
Callbacks.StartupMonitor

public class BulkCompile
extends Object
implements Callbacks.StartupMonitor

Utilities for providing compiler advice. Advice files provided at run time allow compilers to be specified for particular methods

Run time advice is given by identifying an advice file through a command line option: -X:aos:cafi=path-to-advice-file. This file specifies which methods should be optimized, and at what level.

Optionally, a dynamic call graph and edge counts may also be provided in advice files, at the command line. -X:aos:dcfi=path-to-dynamic-call-graph-file. -X:vm:edgeCounterFile=path-to-edge-count-file. These provide synthetic profile data to the compiler that would otherwise be gathered by the AOS at run time. These are therefore strictly an optimization, so they are options.

See Also:
CompilerAdviceAttribute, CompilerAdviceInfoReader, RuntimeCompiler

Constructor Summary
BulkCompile()
           
 
Method Summary
static void compileAllMethods()
          Compile all methods nominated in the compiler advice, which should have been provided in a .ca advice file.
static void init()
           
 void notifyStartup()
          Notify the monitor that the VM has started up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkCompile

public BulkCompile()
Method Detail

init

public static void init()

notifyStartup

public void notifyStartup()
Description copied from interface: Callbacks.StartupMonitor
Notify the monitor that the VM has started up.

Specified by:
notifyStartup in interface Callbacks.StartupMonitor

compileAllMethods

public static void compileAllMethods()
Compile all methods nominated in the compiler advice, which should have been provided in a .ca advice file.

This method will be called at boot time (via notifyStartup()) if ENABLE_PRECOMPILE is true. For replay compilation, this method needs to be called explicitly from within the application or benchmark harness. Typical usage in a benchmarking context would be to call this method at the end of the first iteration of the benchmark so that all/most classes were loaded, and compilation could occur prior to the second iteration.