public class ObjectTracker extends ListenerAdapter implements StateExtensionClient
Modifier and Type | Field and Description |
---|---|
protected StringSetMatcher |
excludeClasses |
protected StringSetMatcher |
includeClasses |
protected gov.nasa.jpf.listener.ObjectTracker.LogRecord |
log |
protected boolean |
logCalls |
protected boolean |
logFieldAccess |
protected IntSet |
trackedRefs |
Constructor and Description |
---|
ObjectTracker(Config conf,
JPF jpf) |
Modifier and Type | Method and Description |
---|---|
void |
classLoaded(VM vm,
ClassInfo ci)
new class was loaded.
|
java.lang.Object |
getStateExtension() |
void |
instructionExecuted(VM vm,
ThreadInfo ti,
Instruction nextInsn,
Instruction executedInsn)
VM has executed the next instruction
(can be used to analyze branches, monitor PUTFIELD / GETFIELD and
INVOKExx / RETURN instructions)
|
protected void |
log(gov.nasa.jpf.listener.ObjectTracker.OpType opType,
ElementInfo ei,
ThreadInfo ti,
Instruction insn) |
void |
objectCreated(VM vm,
ThreadInfo ti,
ElementInfo ei)
new object was created
|
void |
objectReleased(VM vm,
ThreadInfo ti,
ElementInfo ei)
object was garbage collected (after potential finalization)
|
protected void |
printLogOn(java.io.PrintWriter pw) |
void |
publishPropertyViolation(Publisher publisher) |
void |
registerListener(JPF jpf) |
void |
restore(java.lang.Object stateExtension) |
choiceGeneratorAdvanced, choiceGeneratorProcessed, choiceGeneratorRegistered, choiceGeneratorSet, exceptionBailout, exceptionHandled, exceptionThrown, executeInstruction, gcBegin, gcEnd, loadClass, methodEntered, methodExited, objectExposed, objectLocked, objectNotify, objectNotifyAll, objectShared, objectUnlocked, objectWait, propertyViolated, publishConstraintHit, publishFinished, publishProbe, publishStart, publishTransition, searchConstraintHit, searchFinished, searchProbed, searchStarted, stateAdvanced, stateBacktracked, stateProcessed, statePurged, stateRestored, stateStored, threadBlocked, threadInterrupted, threadNotified, threadScheduled, threadStarted, threadTerminated, threadWaiting, vmInitialized
protected gov.nasa.jpf.listener.ObjectTracker.LogRecord log
protected StringSetMatcher includeClasses
protected StringSetMatcher excludeClasses
protected IntSet trackedRefs
protected boolean logFieldAccess
protected boolean logCalls
protected void log(gov.nasa.jpf.listener.ObjectTracker.OpType opType, ElementInfo ei, ThreadInfo ti, Instruction insn)
public void classLoaded(VM vm, ClassInfo ci)
VMListener
classLoaded
in interface VMListener
classLoaded
in class ListenerAdapter
public void objectCreated(VM vm, ThreadInfo ti, ElementInfo ei)
VMListener
objectCreated
in interface VMListener
objectCreated
in class ListenerAdapter
public void objectReleased(VM vm, ThreadInfo ti, ElementInfo ei)
VMListener
objectReleased
in interface VMListener
objectReleased
in class ListenerAdapter
public void instructionExecuted(VM vm, ThreadInfo ti, Instruction nextInsn, Instruction executedInsn)
VMListener
instructionExecuted
in interface VMListener
instructionExecuted
in class ListenerAdapter
public java.lang.Object getStateExtension()
getStateExtension
in interface StateExtensionClient
public void restore(java.lang.Object stateExtension)
restore
in interface StateExtensionClient
public void registerListener(JPF jpf)
registerListener
in interface StateExtensionClient
public void publishPropertyViolation(Publisher publisher)
publishPropertyViolation
in interface PublisherExtension
publishPropertyViolation
in class ListenerAdapter
protected void printLogOn(java.io.PrintWriter pw)