|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.cunit.instrumentors.SynchronizedMethodToBlockStrategy
public class SynchronizedMethodToBlockStrategy
Instrumentor that turns a synchronized methods into an unsynchronized method with a synchronized block.
NOTE: This instrumentation strategy has to be run before SynchronizedBlockStrategy.
Field Summary | |
---|---|
protected java.util.ArrayList<MethodInfo> |
_newMethods
Methods to add. |
Constructor Summary | |
---|---|
SynchronizedMethodToBlockStrategy()
Constructor. |
Method Summary | |
---|---|
void |
done()
Instrumentation of all classes is done. |
void |
instrument(ClassFile cf)
Instrument the class. |
protected void |
instrumentSynchronizedMethod(ClassFile cf,
MethodInfo mi,
byte[] loadLockCode,
int reqdStackSize)
Instrument a synchronized method's code blocks. |
protected void |
instrumentSynchronizedMethods(ClassFile cf)
Instrument synchronized methods in this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<MethodInfo> _newMethods
Constructor Detail |
---|
public SynchronizedMethodToBlockStrategy()
Method Detail |
---|
public void instrument(ClassFile cf)
instrument
in interface IInstrumentationStrategy
cf
- class file infoprotected void instrumentSynchronizedMethods(ClassFile cf)
cf
- class file infoprotected void instrumentSynchronizedMethod(ClassFile cf, MethodInfo mi, byte[] loadLockCode, int reqdStackSize)
synchronized T method(T t...) { abc(); }
into T method(T t...) { synchronized (?) { abc(); } }
cf
- class filemi
- method infoloadLockCode
- instructions to load the object that gets lockedreqdStackSize
- required state sizepublic void done()
done
in interface IInstrumentationStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |