public class BulkCompile extends Object implements Callbacks.StartupMonitor
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.
CompilerAdviceAttribute
,
RuntimeCompiler
Constructor and Description |
---|
BulkCompile() |
Modifier and Type | Method and Description |
---|---|
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.
|
public BulkCompile()
public static void init()
public void notifyStartup()
Callbacks.StartupMonitor
notifyStartup
in interface Callbacks.StartupMonitor
public static void compileAllMethods()
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.