public class CompilerAdviceAttribute extends Object
Each attribute encodes an compiler site and the advice for that site:
<class>
string The name of the class<method>
string The name of the method<signature>
string The method signature<advice>
in The integer value for the
compiler, as given in CompilerInfo<optLevel>
in The optimization level when
the Opt compiler is used
CompilerAdvice
,
CompilerAdviceInfoReader
Modifier and Type | Field and Description |
---|---|
private static HashMap<CompilerAdviceAttribute,CompilerAdviceAttribute> |
attribMap |
private Atom |
className |
private int |
compiler |
private static CompilerAdviceAttribute |
defaultAttr |
private static boolean |
hasAdvice |
private Atom |
methodName |
private Atom |
methodSig |
private int |
optLevel |
private static CompilerAdviceAttribute |
tempAttr |
Constructor and Description |
---|
CompilerAdviceAttribute(Atom className,
Atom methodName,
Atom methodSig,
int compiler)
Constructor
|
CompilerAdviceAttribute(Atom className,
Atom methodName,
Atom methodSig,
int compiler,
int optLevel)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Atom |
getClassName()
Getter method for class name
|
int |
getCompiler()
Getter method for compiler ID
|
static CompilerAdviceAttribute |
getCompilerAdviceInfo(RVMMethod method)
Given a method and bytecode offset, return an compiler advice
attribute or null if none is found for that method and offset.
|
Atom |
getMethodName()
Getter method for method name
|
Atom |
getMethodSig()
Getter method for method signature
|
int |
getOptLevel()
Getter method for optimization level
|
static boolean |
hasAdvice() |
int |
hashCode() |
static void |
postBoot()
Initialization of key compiler advice data structure.
|
static void |
registerCompilerAdvice(List<CompilerAdviceAttribute> compilerAdviceList)
Use a list of compiler advice attributes to create an advice map
keyed on
RVMMethod instances. |
String |
toString()
Stringify this instance
|
static Collection<CompilerAdviceAttribute> |
values() |
private static HashMap<CompilerAdviceAttribute,CompilerAdviceAttribute> attribMap
private static CompilerAdviceAttribute defaultAttr
private static CompilerAdviceAttribute tempAttr
private static boolean hasAdvice
private Atom methodName
private final int compiler
private final int optLevel
public CompilerAdviceAttribute(Atom className, Atom methodName, Atom methodSig, int compiler)
className
- The name of the class for the compiler sitemethodName
- The name of the method for the compiler sitemethodSig
- The signature of the method for the compiler sitecompiler
- The ID of the compiler to use for this methodCompilerAdviceInfoReader
public CompilerAdviceAttribute(Atom className, Atom methodName, Atom methodSig, int compiler, int optLevel)
className
- The name of the class for the compiler sitemethodName
- The name of the method for the compiler sitemethodSig
- The signature of the method for the compiler sitecompiler
- The ID of the compiler to use for this methodoptLevel
- The optimization level if using Opt compilerCompilerAdviceInfoReader
public static void postBoot()
public Atom getClassName()
public Atom getMethodName()
public Atom getMethodSig()
public int getCompiler()
public int getOptLevel()
public static void registerCompilerAdvice(List<CompilerAdviceAttribute> compilerAdviceList)
RVMMethod
instances. This map is used by
getCompilerAdviceInfo()
.compilerAdviceList
- A list of compiler advice attributesgetCompilerAdviceInfo(org.jikesrvm.classloader.RVMMethod)
public static CompilerAdviceAttribute getCompilerAdviceInfo(RVMMethod method)
method
- The method containing the site in questionpublic static Collection<CompilerAdviceAttribute> values()
public static boolean hasAdvice()