public interface VMListener extends JPFListener
Modifier and Type | Method and Description |
---|---|
void |
choiceGeneratorAdvanced(VM vm,
ChoiceGenerator<?> currentCG)
the next choice was requested from a previously registered ChoiceGenerator
NOTE - this notification happens before the KernelState is stored, i.e.
|
void |
choiceGeneratorProcessed(VM vm,
ChoiceGenerator<?> processedCG)
a ChoiceGnerator has returned all his choices
NOTE - this notification happens before the KernelState is stored, i.e.
|
void |
choiceGeneratorRegistered(VM vm,
ChoiceGenerator<?> nextCG,
ThreadInfo currentThread,
Instruction executedInstruction)
next ChoiceGenerator was registered, which means this is the end of the current transition
the reason why we have this in addition to the choiceGeneratorSet is that listeners
can reset the registered CG and so force the current transition to continue (although the
listener in this case has to make sure the operand stack is in a consistent state for
continued execution because there might be a bottom half of an Instruction.execute() missing)
|
void |
choiceGeneratorSet(VM vm,
ChoiceGenerator<?> newCG)
a new ChoiceGenerator was set, which means we are at the beginning of a new transition.
|
void |
classLoaded(VM vm,
ClassInfo loadedClass)
new class was loaded.
|
void |
exceptionBailout(VM vm,
ThreadInfo currentThread)
exception causes top frame to be purged
|
void |
exceptionHandled(VM vm,
ThreadInfo currentThread)
exception handled by current top frame
|
void |
exceptionThrown(VM vm,
ThreadInfo currentThread,
ElementInfo thrownException)
exception was thrown
|
void |
executeInstruction(VM vm,
ThreadInfo currentThread,
Instruction instructionToExecute)
VM is about to execute the next instruction
|
void |
gcBegin(VM vm) |
void |
gcEnd(VM vm) |
void |
instructionExecuted(VM vm,
ThreadInfo currentThread,
Instruction nextInstruction,
Instruction executedInstruction)
VM has executed the next instruction
(can be used to analyze branches, monitor PUTFIELD / GETFIELD and
INVOKExx / RETURN instructions)
|
void |
loadClass(VM vm,
ClassFile cf)
a new classfile is about to be parsed.
|
void |
methodEntered(VM vm,
ThreadInfo currentThread,
MethodInfo enteredMethod)
method body was entered.
|
void |
methodExited(VM vm,
ThreadInfo currentThread,
MethodInfo exitedMethod)
method body was left.
|
void |
objectCreated(VM vm,
ThreadInfo currentThread,
ElementInfo newObject)
new object was created
|
void |
objectLocked(VM vm,
ThreadInfo currentThread,
ElementInfo lockedObject)
notify if an object lock was taken (this includes automatic
surrender during a wait())
|
void |
objectNotify(VM vm,
ThreadInfo currentThread,
ElementInfo notifyingObject)
notify if an object notifies a single waiter
|
void |
objectNotifyAll(VM vm,
ThreadInfo currentThread,
ElementInfo notifyingObject)
notify if an object notifies all waiters
|
void |
objectReleased(VM vm,
ThreadInfo currentThread,
ElementInfo releasedObject)
object was garbage collected (after potential finalization)
|
void |
objectUnlocked(VM vm,
ThreadInfo currentThread,
ElementInfo unlockedObject)
notify if an object lock was released (this includes automatic
reacquisition after a notify())
|
void |
objectWait(VM vm,
ThreadInfo currentThread,
ElementInfo waitingObject)
notify if a wait() is executed
|
void |
threadBlocked(VM vm,
ThreadInfo blockedThread,
ElementInfo lock)
thread waits to acquire a lock
// NOTE: vm.getLastThreadInfo() does NOT have to be the running thread, as this
// notification can occur as a result of a lock operation in the current thread
|
void |
threadInterrupted(VM vm,
ThreadInfo interruptedThread)
thread got interrupted
|
void |
threadNotified(VM vm,
ThreadInfo notifiedThread)
thread got notified
|
void |
threadScheduled(VM vm,
ThreadInfo scheduledThread)
new thread was scheduled by VM
|
void |
threadStarted(VM vm,
ThreadInfo startedThread)
new Thread entered run() method
|
void |
threadTerminated(VM vm,
ThreadInfo terminatedThread)
Thread exited run() method
|
void |
threadWaiting(VM vm,
ThreadInfo waitingThread)
thread is waiting for signal
|
void |
vmInitialized(VM vm)
VM got initialized (but search is not yet running).
|
void vmInitialized(VM vm)
void executeInstruction(VM vm, ThreadInfo currentThread, Instruction instructionToExecute)
void instructionExecuted(VM vm, ThreadInfo currentThread, Instruction nextInstruction, Instruction executedInstruction)
void threadStarted(VM vm, ThreadInfo startedThread)
void threadBlocked(VM vm, ThreadInfo blockedThread, ElementInfo lock)
void threadWaiting(VM vm, ThreadInfo waitingThread)
void threadNotified(VM vm, ThreadInfo notifiedThread)
void threadInterrupted(VM vm, ThreadInfo interruptedThread)
void threadTerminated(VM vm, ThreadInfo terminatedThread)
void threadScheduled(VM vm, ThreadInfo scheduledThread)
void loadClass(VM vm, ClassFile cf)
void classLoaded(VM vm, ClassInfo loadedClass)
void objectCreated(VM vm, ThreadInfo currentThread, ElementInfo newObject)
void objectReleased(VM vm, ThreadInfo currentThread, ElementInfo releasedObject)
void objectLocked(VM vm, ThreadInfo currentThread, ElementInfo lockedObject)
void objectUnlocked(VM vm, ThreadInfo currentThread, ElementInfo unlockedObject)
void objectWait(VM vm, ThreadInfo currentThread, ElementInfo waitingObject)
void objectNotify(VM vm, ThreadInfo currentThread, ElementInfo notifyingObject)
void objectNotifyAll(VM vm, ThreadInfo currentThread, ElementInfo notifyingObject)
void gcBegin(VM vm)
void gcEnd(VM vm)
void exceptionThrown(VM vm, ThreadInfo currentThread, ElementInfo thrownException)
void exceptionBailout(VM vm, ThreadInfo currentThread)
void exceptionHandled(VM vm, ThreadInfo currentThread)
void choiceGeneratorRegistered(VM vm, ChoiceGenerator<?> nextCG, ThreadInfo currentThread, Instruction executedInstruction)
void choiceGeneratorSet(VM vm, ChoiceGenerator<?> newCG)
void choiceGeneratorAdvanced(VM vm, ChoiceGenerator<?> currentCG)
void choiceGeneratorProcessed(VM vm, ChoiceGenerator<?> processedCG)
void methodEntered(VM vm, ThreadInfo currentThread, MethodInfo enteredMethod)
void methodExited(VM vm, ThreadInfo currentThread, MethodInfo exitedMethod)