org.jikesrvm.adaptive.util
Class CompilerAdviceInfoReader
java.lang.Object
org.jikesrvm.adaptive.util.CompilerAdviceInfoReader
class CompilerAdviceInfoReader
- extends Object
Utility to read compiler advice annotations from file in ascii format.
Takes a single argument: the name of the file containing the ascii
annotations. Each line of the file corresponds to an annotation
for one method and has the following format:
Where the types and meanings of the fields is as follows:
<class>
string The name of the class
<method>
string The name of the method
<signature>
string The method signature
<advice>
int The compiler type to be used --
an integer value corresponding to the compiler enumeration in
CompiledMethod
<optLevel>
int (Optional) The opt level to use
if compiler is optimizing compiler
- See Also:
CompilerAdvice
,
CompilerAdviceAttribute
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompilerAdviceInfoReader
CompilerAdviceInfoReader()
readCompilerAdviceFile
public static List<CompilerAdviceAttribute> readCompilerAdviceFile(String file)
- Read annotations from a specified file. Reads all annotations at
once and returns a collection of compiler advice attributes.
- Parameters:
file
- The annotation file to be read
- Returns:
- A list of compiler advice attributes
readOneAttribute
private static CompilerAdviceAttribute readOneAttribute(StringTokenizer st)
- Actual reading is done here. This method reads one attribute
from a single line of an input stream. There are six elements
per line corresponding to each call site. First three are
strings, class name, method name, method
signature, followed by one number,
compiler advice.
- Parameters:
st
- an input stream
- Returns:
- an compileration advice atribute