org.jikesrvm.adaptive.util
Class DynamicCallFileInfoReader

java.lang.Object
  extended by org.jikesrvm.adaptive.util.DynamicCallFileInfoReader

public class DynamicCallFileInfoReader
extends Object

Utility to read dynamic call graph 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:

 CallSite < classloader, classname, method, signature> method_size byte_code_index <callee_classloader, classname, method, signature> method_size weight: weight
 
Where the types and meanings of the fields is as follows:

See Also:
CompilerAdvice

Constructor Summary
DynamicCallFileInfoReader()
           
 
Method Summary
private static RVMMethod getMethod(MethodReference ref)
          Establish the RVMMethod for a given MethodReference gracefully.
static void readDynamicCallFile(String file, boolean boot)
          Read annotations from a specified file.
private static void readOneCallSiteAttribute(StringTokenizer parser, boolean boot)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicCallFileInfoReader

public DynamicCallFileInfoReader()
Method Detail

readDynamicCallFile

public static void readDynamicCallFile(String file,
                                       boolean boot)
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

readOneCallSiteAttribute

private static void readOneCallSiteAttribute(StringTokenizer parser,
                                             boolean boot)

getMethod

private static RVMMethod getMethod(MethodReference ref)
Establish the RVMMethod for a given MethodReference gracefully.

Parameters:
ref - The MethodReference
Returns:
The RVMMethod, or null on failure.