|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.cunit.instrumentors.MarkerInlineStrategy
public class MarkerInlineStrategy
Instrumentation strategy to replace static calls to certain marker methods with inlined bytecode. 1) "invokestatic SyncPointBuffer.monitorEnter" -> "monitorenter". 2) "invokestatic SyncPointBuffer.monitorExit" -> "monitorexit". 3) "invokestatic SyncPointBuffer.isOldThread" -> "invokestatic java/lang/Thread.currentThread; getfield java/lang/Thread.$$$oldThread$$$" 4) "invokestatic SyncPointBuffer.setOldThread" -> "iconst_1; invokestatic java/lang/Thread.currentThread; putfield java/lang/Thread.$$$oldThread$$$"
Field Summary | |
---|---|
private boolean |
_addNames
True if names still have to be added. |
private ReferenceInstruction |
_getOldThreadFieldInstr
getfield java/lang/Thread.$$$oldThread$$$ instruction. |
private GenericInstruction |
_iconst_1
iconst_1 instruction. |
private ReferenceInstruction |
_invokeCurrentThreadInstr
invokestatic java/lang/Thread.currentThread()Ljava/lang/Thread; instruction |
private GenericInstruction |
_monitorEnter
monitorenter instruction. |
private GenericInstruction |
_monitorExit
monitorexit instruction. |
private ReferenceInstruction |
_putOldThreadFieldInstr
putfield java/lang/Thread.$$$oldThread$$$ instruction. |
Constructor Summary | |
---|---|
MarkerInlineStrategy()
|
Method Summary | |
---|---|
private void |
addNamesIfNecessary(ClassFile cf)
Add names to the constant pool if necessary. |
void |
done()
Instrumentation of all classes is done. |
void |
instrument(ClassFile cf)
Instrument the class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final GenericInstruction _monitorEnter
private final GenericInstruction _monitorExit
private final GenericInstruction _iconst_1
private final ReferenceInstruction _getOldThreadFieldInstr
private final ReferenceInstruction _putOldThreadFieldInstr
private final ReferenceInstruction _invokeCurrentThreadInstr
private boolean _addNames
Constructor Detail |
---|
public MarkerInlineStrategy()
Method Detail |
---|
public void instrument(ClassFile cf)
instrument
in interface IInstrumentationStrategy
cf
- class file infoprivate void addNamesIfNecessary(ClassFile cf)
cf
- class filepublic void done()
done
in interface IInstrumentationStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |