|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.controller.ControllerMemory
public final class ControllerMemory
This class records decisions taken by the controller. It will remember controller plans, which contain compilation plans and other goodies, and allows searching for previous decisions
Field Summary | |
---|---|
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. |
Fields inherited from interface org.jikesrvm.Constants |
---|
NOT_REACHED, REFLECTION_FPRS_BITS, REFLECTION_FPRS_MASK, REFLECTION_GPRS_BITS, REFLECTION_GPRS_MASK |
Fields inherited from interface org.jikesrvm.objectmodel.ThinLockConstants |
---|
TL_DEDICATED_U16_OFFSET, TL_DEDICATED_U16_SHIFT, TL_LOCK_COUNT_MASK, TL_LOCK_COUNT_SHIFT, TL_LOCK_COUNT_UNIT, TL_LOCK_ID_MASK, TL_LOCK_ID_SHIFT, TL_NUM_BITS_RC, TL_NUM_BITS_STAT, TL_NUM_BITS_TID, TL_STAT_BIASABLE, TL_STAT_FAT, TL_STAT_MASK, TL_STAT_SHIFT, TL_STAT_THIN, TL_THREAD_ID_MASK, TL_THREAD_ID_SHIFT, TL_UNLOCK_MASK |
Fields inherited from interface org.jikesrvm.objectmodel.TIBLayoutConstants |
---|
IMT_METHOD_SLOTS, NEEDS_DYNAMIC_LINK, TIB_ARRAY_ELEMENT_TIB_INDEX, TIB_DOES_IMPLEMENT_INDEX, TIB_FIRST_SPECIALIZED_METHOD_INDEX, TIB_FIRST_VIRTUAL_METHOD_INDEX, TIB_INTERFACE_DISPATCH_TABLE_INDEX, TIB_SUPERCLASS_IDS_INDEX, TIB_TYPE_INDEX |
Fields inherited from interface org.jikesrvm.HeapLayoutConstants |
---|
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE |
Constructor Summary | |
---|---|
ControllerMemory()
|
Method Summary | |
---|---|
(package private) static String |
asString()
|
(package private) static boolean |
bitIsSet(int bitPattern,
int optLevel)
check 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)
Return true iff there is a plan to transition from Base to Opt for a
given CMID. |
(package private) static int |
setBitPattern(int bitPattern,
int optLevel)
set 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public ControllerMemory()
Method Detail |
---|
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 for
null
public static ControllerPlan findMatchingPlan(CompiledMethod cmpMethod)
cmpMethod
- the compiled method of interest
null
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 interest
static boolean planWithStatus(RVMMethod method, byte status)
true
if there is a plan with the given status for the given method
method
- the method of intereststatus
- the status of interest
public static boolean requestedOSR(int cmid)
true
iff there is a plan to transition from Base to Opt for a
given CMID.
static boolean completedPlanWithOptLevel(RVMMethod method, int optLevel)
true
if there is a completed plan with the given opt level for
the given method
method
- the method of interestoptLevel
- the opt level of interest
public static ControllerPlan findLatestPlan(RVMMethod method)
method
- The method to look for
null
public static void printFinalMethodStats(PrintStream log)
log
- the stream to print tostatic int setBitPattern(int bitPattern, int optLevel)
bitPattern
- optLevel
- static boolean bitIsSet(int bitPattern, int optLevel)
bitPattern
- optLevel
-
static String asString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |