|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.recompilation.CompilerDNA
public class CompilerDNA
This class codifies the cost/benefit properties of the various compilers used in the adaptive optimization system.
The DNA tells the AOS two important kinds of averages for each optimization level: the cost of compiling at an optimization level (as measured in bytecode/milliseconds) and the expected speedup of the resulting code (relative to the first compiler).
There is an AOS command-line option to set the compiler DNA. The method
readDNA(java.lang.String)
contains a comment on the expected format.
This DNA was gathered on July 9, 2008 using revision r14679 + the bugfix in r14688. The PowerPC data was gathered on piccolo.watson.ibm.com (JS21, machine type 8884; ppc64-aix). The IA32 data was gathered on lyric.watson.ibm.com (LS41, machine type 7972; x86_64-linux).
Field Summary | |
---|---|
static int |
BASELINE
|
private static double[][] |
benefitRatio
Benefits of moving from one compilation level to another USAGE NOTE: The data is layed out in a upper triangular matrix |
private static double[] |
compilationRates
Average bytecodes compiled per millisecond. |
private static String[] |
compilerNames
|
private static double[][] |
compileTimeRatio
Compile time ratio of one compilation level to another For example, if compiler1 (say OPT1) compiles at 50 bc/msec and compiler2 (say OPT2) compiles at 100 bc/msec, compileTimeRatio[OPT1][OPT2] = 2 USAGE NOTE: The data is layed out in a upper triangular matrix |
private static int |
numCompilers
The number of compilers available |
(package private) static int |
OPT0
|
(package private) static int |
OPT1
|
(package private) static int |
OPT2
|
private static double[] |
speedupRates
What is the execution rate of each compiler normalized to the 1st compiler |
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 | |
---|---|
CompilerDNA()
|
Method Summary | |
---|---|
static double |
estimateCompileTime(int compiler,
NormalMethod meth)
Estimate how long (in milliseconds) it will/did take the given compiler to compile the given method. |
static double |
getBaselineCompilationRate()
Returns the compilation rates of the baseline compiler in bytecodes/millisecond. |
static double |
getBenefitRatio(int compiler1,
int compiler2)
This method returns the expected speedup from going from compiler1 to compiler2 |
static int |
getCompilerConstant(int optLevel)
maps opt levels to the compiler |
static String |
getCompilerString(int compiler)
maps a compiler constant to a string |
static double |
getCompileTimeRatio(int compiler1,
int compiler2)
What is the additional overhead (relative to compiler1 compile time) of compile2 compile time. |
static int |
getNumberOfCompilers()
returns the number of compilers |
static int |
getOptLevel(int compiler)
A mapping from an Opt compiler number to the corresponding Opt level |
static void |
init()
initialize static fields |
private static void |
initializeCompilerRatioArrays()
|
private static void |
processOneLine(LineNumberReader in,
String title,
double[] valueHolder)
Helper method to read one line of the DNA file |
private static void |
readDNA(String filename)
Read a serialized representation of the DNA info |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String[] compilerNames
public static final int BASELINE
static final int OPT0
static final int OPT1
static final int OPT2
private static int numCompilers
private static final double[] compilationRates
private static final double[] speedupRates
private static double[][] benefitRatio
private static double[][] compileTimeRatio
Constructor Detail |
---|
public CompilerDNA()
Method Detail |
---|
public static double getBenefitRatio(int compiler1, int compiler2)
compiler1
- compiler2
-
public static double getCompileTimeRatio(int compiler1, int compiler2)
compiler1
- the compiler whose compile time we compare tocompiler2
- the compiler's compile time we care about
public static double estimateCompileTime(int compiler, NormalMethod meth)
compiler
- the compiler to compile methmeth
- the method to be compiled
public static double getBaselineCompilationRate()
public static void init()
private static void initializeCompilerRatioArrays()
private static void readDNA(String filename)
filename
- DNA filenameprivate static void processOneLine(LineNumberReader in, String title, double[] valueHolder) throws IOException
in
- the LineNumberReader objecttitle
- the title string to look forvalueHolder
- the array to hold the read values
IOException
public static int getNumberOfCompilers()
public static int getOptLevel(int compiler)
compiler
- the compiler constant of interest
public static String getCompilerString(int compiler)
compiler
-
public static int getCompilerConstant(int optLevel)
optLevel
- opt level
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |