org.jikesrvm.adaptive.recompilation.instrumentation
Class InsertYieldpointCounters
java.lang.Object
org.jikesrvm.compilers.opt.driver.CompilerPhase
org.jikesrvm.adaptive.recompilation.instrumentation.InsertYieldpointCounters
public class InsertYieldpointCounters
- extends CompilerPhase
An opt compiler phase that inserts yieldpoint counters. Searches
for all yieldpoint instructions and inserts an increment after
them, using the CounterArrayManager counter manager to implement
the counters.
Field Summary |
(package private) static boolean |
DEBUG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
static final boolean DEBUG
- See Also:
- Constant Field Values
InsertYieldpointCounters
public InsertYieldpointCounters()
newExecution
public CompilerPhase newExecution(IR ir)
- Return this instance of this phase. This phase contains no
per-compilation instance fields.
- Overrides:
newExecution
in class CompilerPhase
- Parameters:
ir
- not used
- Returns:
- this
shouldPerform
public final boolean shouldPerform(OptOptions options)
- Description copied from class:
CompilerPhase
- This method determines if the phase should be run, based on the
Options object it is passed.
By default, phases are always performed.
Subclasses should override this method if they only want
to be performed conditionally.
- Overrides:
shouldPerform
in class CompilerPhase
- Parameters:
options
- the compiler options for the compilation
- Returns:
- true if the phase should be performed
getName
public final String getName()
- Specified by:
getName
in class CompilerPhase
- Returns:
- a String which is the name of the phase.
perform
public final void perform(IR ir)
- counters after all yieldpoint instructions
- Specified by:
perform
in class CompilerPhase
- Parameters:
ir
- the governing IR
yieldpointPrefix
private static String yieldpointPrefix(Operator op)
- Return a string based version of the passed yieldpoint operator
- Parameters:
op
- the yieldpoint operator
- Returns:
- a string based on the type of yieldpoint operator