public final class ControllerMemory extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
awoken
Number of times controller is awoken
|
private static int |
didNothing
Number of times controller is awoken and did nothing.
|
private static int |
numBase |
private static int |
numMethodsConsidered |
private static int |
numMethodsScheduledForRecomp |
private static int |
numOpt0 |
private static int |
numOpt1 |
private static int |
numOpt2 |
private static int |
numOpt3 |
private static int |
numOpt4 |
private static ImmutableEntryHashMapRVM<RVMMethod,LinkedList<ControllerPlan>> |
table
This is a hashtable of controller plans indexed by RVMMethod.
|
Constructor and Description |
---|
ControllerMemory() |
Modifier and Type | Method and Description |
---|---|
(package private) static String |
asString() |
(package private) static boolean |
bitIsSet(int bitPattern,
int optLevel)
Checks if the bit position defined by the 2nd parm is set in the first parm
|
(package private) static boolean |
completedPlanWithOptLevel(RVMMethod method,
int optLevel)
Return
true if there is a completed plan with the given opt level for
the given method |
static ControllerPlan |
findLatestPlan(RVMMethod method)
Looks for the last controller plan for the passed method
|
static ControllerPlan |
findMatchingPlan(CompiledMethod cmpMethod)
Find the plan for the compiled method that is passed
|
private static LinkedList<ControllerPlan> |
findPlan(RVMMethod method)
Looks for a controller plan for the passed method
|
static int |
getNumAwoken() |
static int |
getNumBase() |
static int |
getNumDidNothing() |
static int |
getNumMethodsConsidered() |
static int |
getNumMethodsScheduledForRecomp() |
static int |
getNumOpt0() |
static int |
getNumOpt1() |
static int |
getNumOpt2() |
static int |
getNumOpt3() |
(package private) static int |
getNumOpt4() |
(package private) static void |
incrementNumAwoken() |
static void |
incrementNumBase() |
(package private) static void |
incrementNumDidNothing() |
(package private) static void |
incrementNumMethodsConsidered() |
(package private) static void |
incrementNumMethodsScheduledForRecomp() |
(package private) static void |
incrementNumOpt0() |
(package private) static void |
incrementNumOpt1() |
(package private) static void |
incrementNumOpt2() |
(package private) static void |
incrementNumOpt3() |
(package private) static void |
incrementNumOpt4() |
(package private) static void |
insert(ControllerPlan plan)
Inserts a controller plan keyed on the underlying method
|
(package private) static boolean |
planWithStatus(RVMMethod method,
byte status)
Return
true if there is a plan with the given status for the given method |
static void |
printFinalMethodStats(PrintStream log)
This method summarizes the recompilation actions taken for all methods
in this object and produces a report to the passed PrintStream.
|
static boolean |
requestedOSR(int cmid) |
(package private) static int |
setBitPattern(int bitPattern,
int optLevel)
Sets the optLevel bit in the passed bitPattern and return the result
|
(package private) static boolean |
shouldConsiderForInitialRecompilation(RVMMethod method)
Determine if the passed method should be considered as a candidate
for _initial_ AOS recompilation.
|
private static final ImmutableEntryHashMapRVM<RVMMethod,LinkedList<ControllerPlan>> table
private static int didNothing
private static int awoken
private static int numMethodsConsidered
private static int numMethodsScheduledForRecomp
private static int numBase
private static int numOpt0
private static int numOpt1
private static int numOpt2
private static int numOpt3
private static int numOpt4
public ControllerMemory()
public static int getNumAwoken()
public static int getNumDidNothing()
public static int getNumMethodsConsidered()
public static int getNumMethodsScheduledForRecomp()
public static int getNumBase()
public static int getNumOpt0()
public static int getNumOpt1()
public static int getNumOpt2()
public static int getNumOpt3()
static int getNumOpt4()
static void incrementNumAwoken()
static void incrementNumDidNothing()
static void incrementNumMethodsConsidered()
static void incrementNumMethodsScheduledForRecomp()
public static void incrementNumBase()
static void incrementNumOpt0()
static void incrementNumOpt1()
static void incrementNumOpt2()
static void incrementNumOpt3()
static void incrementNumOpt4()
static void insert(ControllerPlan plan)
plan
- the controller plan to insertprivate static LinkedList<ControllerPlan> findPlan(RVMMethod method)
method
- The method to look fornull
public static ControllerPlan findMatchingPlan(CompiledMethod cmpMethod)
cmpMethod
- the compiled method of interestnull
if none exists.static boolean shouldConsiderForInitialRecompilation(RVMMethod method)
ControllerPlan.IN_PROGRESS
,
ControllerPlan.COMPLETED
, ControllerPlan.OUTDATED
,
or ControllerPlan.ABORTED_COMPILATION_ERROR
because of compilation error.method
- the method of intereststatic boolean planWithStatus(RVMMethod method, byte status)
true
if there is a plan with the given status for the given methodmethod
- the method of intereststatus
- the status of interestpublic static boolean requestedOSR(int cmid)
cmid
- the compiled method's IDtrue
iff there is a plan to transition from Base to Opt for a
given CMIDstatic boolean completedPlanWithOptLevel(RVMMethod method, int optLevel)
true
if there is a completed plan with the given opt level for
the given methodmethod
- the method of interestoptLevel
- the opt level of interestpublic static ControllerPlan findLatestPlan(RVMMethod method)
method
- The method to look fornull
public static void printFinalMethodStats(PrintStream log)
log
- the stream to print tostatic int setBitPattern(int bitPattern, int optLevel)
bitPattern
- the given bit patternoptLevel
- the new opt levelstatic boolean bitIsSet(int bitPattern, int optLevel)
bitPattern
- a bit patternoptLevel
- the opt level to check for