|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.tools.oth.OptTestHarness
class OptTestHarness
A test harness for the optimizing compiler.
The role of this class is to allow the optimizing compiler
to be run as an "application" to enabling selective testing and
debugging of the optimizing compiler.
For example, the following command line:
rvm -X:h=100 org.jikesrvm.tools.oth.OptTestHarness -oc:O2 -oc:phases=true -class hanoi -er hanoi run -
Any command that can be given to the optimizing compiler via -X:irc:<cmd> can be given to the optimizing compiler by org.jikesrvm.tools.oth.OptTestHarness via -oc:<cmd>. In addition, the org.jikesrvm.tools.oth.OptTestHarness supports the following commands:
-useBootOptions Use the same OptOptions as the bootimage compiler. -longcommandlineRead commands (one per line) from a file +baseline Switch default compiler to baseline -baseline Switch default compiler to optimizing -load Load a class -class Load a class and compile all its methods -method [-| ] Compile method with default compiler -methodOpt [-| ] Compile method with opt compiler -methodBase [-| ] Compile method with base compiler -er [-| ] {args} Compile with default compiler and execute a method -performance Show performance results
Nested Class Summary | |
---|---|
private static class |
OptTestHarness.Performance
|
Field Summary | |
---|---|
(package private) static boolean |
BASELINE
Default value for for compiling opt/baseline |
(package private) static Vector<RVMMethod> |
baselineMethodVector
|
(package private) static ClassLoader |
cl
|
(package private) static boolean |
DISABLE_CLASS_LOADING
|
(package private) static boolean |
EXECUTE_MAIN
|
(package private) static boolean |
EXECUTE_WITH_REFLECTION
|
(package private) static String[] |
mainArgs
|
(package private) static RVMClass |
mainClass
|
(package private) static OptOptions |
options
|
(package private) static Vector<RVMMethod> |
optMethodVector
|
(package private) static Vector<OptOptions> |
optOptionsVector
|
(package private) static OptTestHarness.Performance |
perf
Record and show performance of executed methods, if any |
(package private) static boolean |
PRINT_CODE_ADDRESS
Should we print the address of compiled methods (useful for debugging) |
(package private) static Object[] |
reflectMethodArgs
|
(package private) static Vector<Object[]> |
reflectMethodArgsVector
|
(package private) static Vector<RVMMethod> |
reflectMethodVector
|
(package private) static Method |
reflectoid
|
(package private) static Vector<Method> |
reflectoidVector
|
Constructor Summary | |
---|---|
OptTestHarness()
|
Method Summary | |
---|---|
private static void |
compileMethodsInVector()
|
private static void |
executeCommand()
|
(package private) static RVMMethod |
findDeclaredOrFirstMethod(RVMClass klass,
String methname,
String methdesc)
Finds a method, either one with a given descriptor or the first matching one in in the given class. |
(package private) static RVMClass |
loadClass(String s)
|
static void |
main(String[] args)
|
(package private) static int |
parseMethodArgs(TypeReference[] argDesc,
String[] args,
int i,
Object[] methodArgs)
|
(package private) static void |
printFormatString()
|
private static void |
processClass(RVMClass klass,
OptOptions opts)
|
private static void |
processMethod(RVMMethod method,
OptOptions opts)
|
private static void |
processMethod(RVMMethod method,
OptOptions opts,
boolean isBaseline)
|
private static void |
processOptionString(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static boolean DISABLE_CLASS_LOADING
static boolean EXECUTE_WITH_REFLECTION
static boolean EXECUTE_MAIN
static boolean BASELINE
static boolean PRINT_CODE_ADDRESS
static OptTestHarness.Performance perf
static ClassLoader cl
static Vector<RVMMethod> optMethodVector
static Vector<OptOptions> optOptionsVector
static Vector<RVMMethod> baselineMethodVector
static Method reflectoid
static Object[] reflectMethodArgs
static Vector<Method> reflectoidVector
static Vector<RVMMethod> reflectMethodVector
static Vector<Object[]> reflectMethodArgsVector
static RVMClass mainClass
static String[] mainArgs
static OptOptions options
Constructor Detail |
---|
OptTestHarness()
Method Detail |
---|
static int parseMethodArgs(TypeReference[] argDesc, String[] args, int i, Object[] methodArgs)
static RVMMethod findDeclaredOrFirstMethod(RVMClass klass, String methname, String methdesc)
klass
- the class to searchmethname
- the method's namemethdesc
- a descriptor of the method's signature if a specific
method is desired or "-" to find the first method with the given name
null
if no method was foundstatic RVMClass loadClass(String s) throws ClassNotFoundException
ClassNotFoundException
static void printFormatString()
private static void processClass(RVMClass klass, OptOptions opts)
private static void processMethod(RVMMethod method, OptOptions opts)
private static void processMethod(RVMMethod method, OptOptions opts, boolean isBaseline)
private static void processOptionString(String[] args)
private static void compileMethodsInVector()
private static void executeCommand() throws InvocationTargetException, IllegalAccessException
InvocationTargetException
IllegalAccessException
public static void main(String[] args) throws InvocationTargetException, IllegalAccessException
InvocationTargetException
IllegalAccessException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |