chord.instr
Class InstrScheme

java.lang.Object
  extended by chord.instr.InstrScheme
All Implemented Interfaces:
java.io.Serializable

public class InstrScheme
extends java.lang.Object
implements java.io.Serializable

Scheme specifying the kind and format of events to be generated during an instrumented program's execution. This class is exclusively used by Instrumentor, and determines which program points the Instrumentor class will modify and which events it will generate.

Author:
Mayur Naik (mhn@cs.stanford.edu)
See Also:
Serialized Form

Nested Class Summary
 class InstrScheme.EventFormat
           
 
Field Summary
static int ACQUIRE_LOCK
           
static int ALOAD_PRIMITIVE
           
static int ALOAD_REFERENCE
           
static int ASTORE_PRIMITIVE
           
static int ASTORE_REFERENCE
           
static int ENTER_MAIN_METHOD
           
static int ENTER_METHOD
           
static int EXPLICIT_THROW
           
static int GETFIELD_PRIMITIVE
           
static int GETFIELD_REFERENCE
           
static int GETSTATIC_PRIMITIVE
           
static int GETSTATIC_REFERENCE
           
static int IMPLICIT_THROW
           
static java.lang.String INSTR_SCHEME_FILE_KEY
           
static int LEAVE_METHOD
           
static int MAX_NUM_EVENT_FORMATS
           
static int METHOD_CALL
           
static int NEW
           
static int NEWARRAY
           
static int NOTIFY
           
static int PUTFIELD_PRIMITIVE
           
static int PUTFIELD_REFERENCE
           
static int PUTSTATIC_PRIMITIVE
           
static int PUTSTATIC_REFERENCE
           
static int RELEASE_LOCK
           
static int RETURN_PRIMITIVE
           
static int RETURN_REFERENCE
           
static int THREAD_JOIN
           
static int THREAD_START
           
static int WAIT
           
 
Constructor Summary
InstrScheme()
           
 
Method Summary
 InstrScheme.EventFormat getEvent(int eventId)
           
 boolean hasAloadEvent()
           
 boolean hasArrayEvent()
           
 boolean hasAstoreEvent()
           
 boolean hasBasicBlockEvent()
           
 boolean hasEnterAndLeaveLoopEvent()
           
 boolean hasFieldEvent()
           
 boolean hasGetfieldEvent()
           
 boolean hasGetstaticEvent()
           
 boolean hasPutfieldEvent()
           
 boolean hasPutstaticEvent()
           
 boolean hasQuadEvent()
           
 boolean hasStaticEvent()
           
static InstrScheme load(java.lang.String fileName)
           
 boolean needsBmap()
           
 boolean needsEmap()
           
 boolean needsFmap()
           
 boolean needsHmap()
           
 boolean needsImap()
           
 boolean needsLmap()
           
 boolean needsMmap()
           
 boolean needsPmap()
           
 boolean needsRmap()
           
 boolean needsTraceTransform()
           
 void save(java.lang.String fileName)
           
 void setAcquireLockEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setAloadPrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasIdx)
           
 void setAloadReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasIdx, boolean hasObj)
           
 void setAstorePrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasIdx)
           
 void setAstoreReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasIdx, boolean hasObj)
           
 void setBasicBlockEvent()
           
 void setEnterAndLeaveLoopEvent()
           
 void setEnterMainMethodEvent(boolean hasThr)
           
 void setEnterMethodEvent(boolean hasLoc, boolean hasThr)
           
 void setExplicitThrowEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setGetfieldPrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld)
           
 void setGetfieldReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld, boolean hasObj)
           
 void setGetstaticPrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld)
           
 void setGetstaticReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld, boolean hasObj)
           
 void setImplicitThrowEvent(boolean hasThr, boolean hasObj)
           
 void setLeaveMethodEvent(boolean hasLoc, boolean hasThr)
           
 void setMethodCallEvent(boolean hasLoc, boolean hasThr, boolean hasObj, boolean isBef, boolean isAft)
           
 void setNewArrayEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setNewEvent(boolean hasLoc, boolean hasThr, boolean hasObj, boolean isBef, boolean isAft)
           
 void setNotifyEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setPutfieldPrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld)
           
 void setPutfieldReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld, boolean hasObj)
           
 void setPutstaticPrimitiveEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld)
           
 void setPutstaticReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasBaseObj, boolean hasFld, boolean hasObj)
           
 void setQuadEvent()
           
 void setReleaseLockEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setReturnPrimitiveEvent(boolean hasLoc, boolean hasThr)
           
 void setReturnReferenceEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setThreadJoinEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setThreadStartEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 void setWaitEvent(boolean hasLoc, boolean hasThr, boolean hasObj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTR_SCHEME_FILE_KEY

public static final java.lang.String INSTR_SCHEME_FILE_KEY
See Also:
Constant Field Values

NEW

public static final int NEW
See Also:
Constant Field Values

NEWARRAY

public static final int NEWARRAY
See Also:
Constant Field Values

GETSTATIC_PRIMITIVE

public static final int GETSTATIC_PRIMITIVE
See Also:
Constant Field Values

GETSTATIC_REFERENCE

public static final int GETSTATIC_REFERENCE
See Also:
Constant Field Values

PUTSTATIC_PRIMITIVE

public static final int PUTSTATIC_PRIMITIVE
See Also:
Constant Field Values

PUTSTATIC_REFERENCE

public static final int PUTSTATIC_REFERENCE
See Also:
Constant Field Values

GETFIELD_PRIMITIVE

public static final int GETFIELD_PRIMITIVE
See Also:
Constant Field Values

GETFIELD_REFERENCE

public static final int GETFIELD_REFERENCE
See Also:
Constant Field Values

PUTFIELD_PRIMITIVE

public static final int PUTFIELD_PRIMITIVE
See Also:
Constant Field Values

PUTFIELD_REFERENCE

public static final int PUTFIELD_REFERENCE
See Also:
Constant Field Values

ALOAD_PRIMITIVE

public static final int ALOAD_PRIMITIVE
See Also:
Constant Field Values

ALOAD_REFERENCE

public static final int ALOAD_REFERENCE
See Also:
Constant Field Values

ASTORE_PRIMITIVE

public static final int ASTORE_PRIMITIVE
See Also:
Constant Field Values

ASTORE_REFERENCE

public static final int ASTORE_REFERENCE
See Also:
Constant Field Values

METHOD_CALL

public static final int METHOD_CALL
See Also:
Constant Field Values

RETURN_PRIMITIVE

public static final int RETURN_PRIMITIVE
See Also:
Constant Field Values

RETURN_REFERENCE

public static final int RETURN_REFERENCE
See Also:
Constant Field Values

EXPLICIT_THROW

public static final int EXPLICIT_THROW
See Also:
Constant Field Values

IMPLICIT_THROW

public static final int IMPLICIT_THROW
See Also:
Constant Field Values

THREAD_START

public static final int THREAD_START
See Also:
Constant Field Values

THREAD_JOIN

public static final int THREAD_JOIN
See Also:
Constant Field Values

ACQUIRE_LOCK

public static final int ACQUIRE_LOCK
See Also:
Constant Field Values

RELEASE_LOCK

public static final int RELEASE_LOCK
See Also:
Constant Field Values

WAIT

public static final int WAIT
See Also:
Constant Field Values

NOTIFY

public static final int NOTIFY
See Also:
Constant Field Values

ENTER_METHOD

public static final int ENTER_METHOD
See Also:
Constant Field Values

LEAVE_METHOD

public static final int LEAVE_METHOD
See Also:
Constant Field Values

ENTER_MAIN_METHOD

public static final int ENTER_MAIN_METHOD
See Also:
Constant Field Values

MAX_NUM_EVENT_FORMATS

public static final int MAX_NUM_EVENT_FORMATS
See Also:
Constant Field Values
Constructor Detail

InstrScheme

public InstrScheme()
Method Detail

getEvent

public InstrScheme.EventFormat getEvent(int eventId)

setEnterMainMethodEvent

public void setEnterMainMethodEvent(boolean hasThr)

setEnterMethodEvent

public void setEnterMethodEvent(boolean hasLoc,
                                boolean hasThr)

setLeaveMethodEvent

public void setLeaveMethodEvent(boolean hasLoc,
                                boolean hasThr)

setEnterAndLeaveLoopEvent

public void setEnterAndLeaveLoopEvent()

hasEnterAndLeaveLoopEvent

public boolean hasEnterAndLeaveLoopEvent()

setBasicBlockEvent

public void setBasicBlockEvent()

hasBasicBlockEvent

public boolean hasBasicBlockEvent()

setQuadEvent

public void setQuadEvent()

hasQuadEvent

public boolean hasQuadEvent()

setMethodCallEvent

public void setMethodCallEvent(boolean hasLoc,
                               boolean hasThr,
                               boolean hasObj,
                               boolean isBef,
                               boolean isAft)

setNewEvent

public void setNewEvent(boolean hasLoc,
                        boolean hasThr,
                        boolean hasObj,
                        boolean isBef,
                        boolean isAft)

setNewArrayEvent

public void setNewArrayEvent(boolean hasLoc,
                             boolean hasThr,
                             boolean hasObj)

setGetstaticPrimitiveEvent

public void setGetstaticPrimitiveEvent(boolean hasLoc,
                                       boolean hasThr,
                                       boolean hasBaseObj,
                                       boolean hasFld)

setGetstaticReferenceEvent

public void setGetstaticReferenceEvent(boolean hasLoc,
                                       boolean hasThr,
                                       boolean hasBaseObj,
                                       boolean hasFld,
                                       boolean hasObj)

setPutstaticPrimitiveEvent

public void setPutstaticPrimitiveEvent(boolean hasLoc,
                                       boolean hasThr,
                                       boolean hasBaseObj,
                                       boolean hasFld)

setPutstaticReferenceEvent

public void setPutstaticReferenceEvent(boolean hasLoc,
                                       boolean hasThr,
                                       boolean hasBaseObj,
                                       boolean hasFld,
                                       boolean hasObj)

setGetfieldPrimitiveEvent

public void setGetfieldPrimitiveEvent(boolean hasLoc,
                                      boolean hasThr,
                                      boolean hasBaseObj,
                                      boolean hasFld)

setGetfieldReferenceEvent

public void setGetfieldReferenceEvent(boolean hasLoc,
                                      boolean hasThr,
                                      boolean hasBaseObj,
                                      boolean hasFld,
                                      boolean hasObj)

setPutfieldPrimitiveEvent

public void setPutfieldPrimitiveEvent(boolean hasLoc,
                                      boolean hasThr,
                                      boolean hasBaseObj,
                                      boolean hasFld)

setPutfieldReferenceEvent

public void setPutfieldReferenceEvent(boolean hasLoc,
                                      boolean hasThr,
                                      boolean hasBaseObj,
                                      boolean hasFld,
                                      boolean hasObj)

setAloadPrimitiveEvent

public void setAloadPrimitiveEvent(boolean hasLoc,
                                   boolean hasThr,
                                   boolean hasBaseObj,
                                   boolean hasIdx)

setAloadReferenceEvent

public void setAloadReferenceEvent(boolean hasLoc,
                                   boolean hasThr,
                                   boolean hasBaseObj,
                                   boolean hasIdx,
                                   boolean hasObj)

setAstorePrimitiveEvent

public void setAstorePrimitiveEvent(boolean hasLoc,
                                    boolean hasThr,
                                    boolean hasBaseObj,
                                    boolean hasIdx)

setAstoreReferenceEvent

public void setAstoreReferenceEvent(boolean hasLoc,
                                    boolean hasThr,
                                    boolean hasBaseObj,
                                    boolean hasIdx,
                                    boolean hasObj)

setReturnPrimitiveEvent

public void setReturnPrimitiveEvent(boolean hasLoc,
                                    boolean hasThr)

setReturnReferenceEvent

public void setReturnReferenceEvent(boolean hasLoc,
                                    boolean hasThr,
                                    boolean hasObj)

setExplicitThrowEvent

public void setExplicitThrowEvent(boolean hasLoc,
                                  boolean hasThr,
                                  boolean hasObj)

setImplicitThrowEvent

public void setImplicitThrowEvent(boolean hasThr,
                                  boolean hasObj)

setThreadStartEvent

public void setThreadStartEvent(boolean hasLoc,
                                boolean hasThr,
                                boolean hasObj)

setThreadJoinEvent

public void setThreadJoinEvent(boolean hasLoc,
                               boolean hasThr,
                               boolean hasObj)

setAcquireLockEvent

public void setAcquireLockEvent(boolean hasLoc,
                                boolean hasThr,
                                boolean hasObj)

setReleaseLockEvent

public void setReleaseLockEvent(boolean hasLoc,
                                boolean hasThr,
                                boolean hasObj)

setWaitEvent

public void setWaitEvent(boolean hasLoc,
                         boolean hasThr,
                         boolean hasObj)

setNotifyEvent

public void setNotifyEvent(boolean hasLoc,
                           boolean hasThr,
                           boolean hasObj)

hasFieldEvent

public boolean hasFieldEvent()

hasStaticEvent

public boolean hasStaticEvent()

hasArrayEvent

public boolean hasArrayEvent()

hasGetstaticEvent

public boolean hasGetstaticEvent()

hasPutstaticEvent

public boolean hasPutstaticEvent()

hasGetfieldEvent

public boolean hasGetfieldEvent()

hasPutfieldEvent

public boolean hasPutfieldEvent()

hasAloadEvent

public boolean hasAloadEvent()

hasAstoreEvent

public boolean hasAstoreEvent()

needsMmap

public boolean needsMmap()

needsHmap

public boolean needsHmap()

needsEmap

public boolean needsEmap()

needsFmap

public boolean needsFmap()

needsImap

public boolean needsImap()

needsPmap

public boolean needsPmap()

needsLmap

public boolean needsLmap()

needsRmap

public boolean needsRmap()

needsBmap

public boolean needsBmap()

needsTraceTransform

public boolean needsTraceTransform()

load

public static InstrScheme load(java.lang.String fileName)

save

public void save(java.lang.String fileName)