org.jikesrvm.adaptive.recompilation
Class InvocationCounts

java.lang.Object
  extended by org.jikesrvm.adaptive.recompilation.InvocationCounts

public final class InvocationCounts
extends Object

Runtime system support for using invocation counters in baseline compiled code to select methods for optimizing recompilation by the adaptive system. Bypasses the normal controller logic: If an invocation counter trips, then the method is enqueued for recompilation at a default optimization level.


Field Summary
private static OptOptions _options
           
private static OptimizationPlanElement[] _optPlan
           
private static int[] counts
           
private static boolean[] processed
           
 
Constructor Summary
InvocationCounts()
           
 
Method Summary
static void allocateCounter(int id)
           
(package private) static void counterTripped(int id)
          Called from baseline compiled code when a method's invocation counter becomes negative and thus must be handled
static CompilationPlan createCompilationPlan(NormalMethod method)
          Create the compilation plan according to the default set of <optimization plan, options> pairs
static CompilationPlan createCompilationPlan(NormalMethod method, AOSInstrumentationPlan instPlan)
           
(package private) static void createOptimizationPlan()
          Create the default set of pairs Process optimizing compiler command line options.
static void init()
          Initialize the recompilation strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counts

private static int[] counts

processed

private static boolean[] processed

_optPlan

private static OptimizationPlanElement[] _optPlan

_options

private static OptOptions _options
Constructor Detail

InvocationCounts

public InvocationCounts()
Method Detail

allocateCounter

public static void allocateCounter(int id)

counterTripped

static void counterTripped(int id)
Called from baseline compiled code when a method's invocation counter becomes negative and thus must be handled


createCompilationPlan

public static CompilationPlan createCompilationPlan(NormalMethod method)
Create the compilation plan according to the default set of <optimization plan, options> pairs


createCompilationPlan

public static CompilationPlan createCompilationPlan(NormalMethod method,
                                                    AOSInstrumentationPlan instPlan)

init

public static void init()
Initialize the recompilation strategy.

Note: This uses the command line options to set up the optimization plans, so this must be run after the command line options are available.


createOptimizationPlan

static void createOptimizationPlan()
Create the default set of pairs Process optimizing compiler command line options.