edu.rice.cs.cunit.instrumentors.record
Class CompactSynchronizedBlockStrategy

java.lang.Object
  extended by edu.rice.cs.cunit.instrumentors.record.CompactSynchronizedBlockStrategy
All Implemented Interfaces:
IInstrumentationStrategy

public class CompactSynchronizedBlockStrategy
extends java.lang.Object
implements IInstrumentationStrategy

Instrumentor for synchronized blocks, using the compact sync point list.

A synchronized block like synchronized(o) { abc(); } gets translated into synchronized(o) { SyncPointBuffer.compactAdd(SP_MONITORENTER,tid); abc(); SyncPointBuffer.compactAdd(SP_MONITOREXIT,tid); }

Author:
Mathias Ricken

Constructor Summary
CompactSynchronizedBlockStrategy()
           
 
Method Summary
 void done()
          Instrumentation of all classes is done.
 void instrument(ClassFile cf)
          Instrument the class.
static boolean isClassInstrumentable(java.lang.String className)
          Return true if the class specified by the class name can be instrumented with the synchronized block instrumentor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompactSynchronizedBlockStrategy

public CompactSynchronizedBlockStrategy()
Method Detail

instrument

public void instrument(ClassFile cf)
Instrument the class.

Specified by:
instrument in interface IInstrumentationStrategy
Parameters:
cf - class file info

isClassInstrumentable

public static boolean isClassInstrumentable(java.lang.String className)
Return true if the class specified by the class name can be instrumented with the synchronized block instrumentor.

Parameters:
className - name of the class
Returns:
true if the class can be instrumented

done

public void done()
Instrumentation of all classes is done.

Specified by:
done in interface IInstrumentationStrategy