|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy
edu.rice.cs.cunit.instrumentors.record.CompactRecordBufferCodeStrategy
public class CompactRecordBufferCodeStrategy
Instrumentation strategy that adds code to call SyncPointBuffer.compactAdd and write a code-tid pair.
| Field Summary | |
|---|---|
protected long |
_code
Code to write to the buffer. |
| Fields inherited from class edu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy |
|---|
_afterOpcodePredicate, _beforeOpcodePredicate, _classPredicate, _methodPredicate, OPCODE_NEVER |
| Constructor Summary | |
|---|---|
CompactRecordBufferCodeStrategy(IPredicate<ClassFile> classPredicate,
IPredicate.Binary<ClassFile,MethodInfo> methodPredicate,
IPredicate.Ternary<ClassFile,MethodInfo,InstructionList> opcodePredicate,
long code)
Create a new strategy with the specified predicates. |
|
| Method Summary | |
|---|---|
boolean |
insertEndOfMethod(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter)
Insert instructions at the end of the method. |
void |
insertInstructionsAfter(ClassFile cf,
MethodInfo mi,
InstructionList il)
Insert instructions after. |
void |
insertInstructionsBefore(ClassFile cf,
MethodInfo mi,
InstructionList il)
Add instructions to call SyncPointBuffer. |
void |
modifyStackAndLocals(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter,
boolean insertEndOfMethod)
Modify the stack size and number of local variables so that the added instructions can execute. |
| Methods inherited from class edu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy |
|---|
done, instrument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long _code
| Constructor Detail |
|---|
public CompactRecordBufferCodeStrategy(IPredicate<ClassFile> classPredicate,
IPredicate.Binary<ClassFile,MethodInfo> methodPredicate,
IPredicate.Ternary<ClassFile,MethodInfo,InstructionList> opcodePredicate,
long code)
classPredicate - predicate that decides if this class should be instrumentedmethodPredicate - predicate that decides if this method should be instrumentedopcodePredicate - predicate that decides if this opcode should be instrumentedcode - code to write to the buffer| Method Detail |
|---|
public void insertInstructionsBefore(ClassFile cf,
MethodInfo mi,
InstructionList il)
insertInstructionsBefore in class AInsertAtOpcodeStrategycf - class filemi - method informationil - instruction list
public void insertInstructionsAfter(ClassFile cf,
MethodInfo mi,
InstructionList il)
insertInstructionsAfter in class AInsertAtOpcodeStrategycf - class filemi - method informationil - instruction list
public boolean insertEndOfMethod(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter)
insertEndOfMethod in class AInsertAtOpcodeStrategycf - class filemi - method informationil - instruction listinsertBefore - true if code was inserted before an opcodeinsertAfter - true if code was inserted after an opcode
public void modifyStackAndLocals(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter,
boolean insertEndOfMethod)
modifyStackAndLocals in class AInsertAtOpcodeStrategycf - class filemi - method informationil - instruction listinsertBefore - true if code was inserted before an opcodeinsertAfter - true if code was inserted after an opcodeinsertEndOfMethod - true if code was inserted at the end of the method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||