sofya.apps.atomicity
Class DynamicEscapeDetector

java.lang.Object
  extended by sofya.ed.semantic.EventFilter
      extended by sofya.ed.semantic.EventSelectionFilter
          extended by sofya.apps.atomicity.DynamicEscapeDetector
All Implemented Interfaces:
EventListener

public final class DynamicEscapeDetector
extends EventSelectionFilter

Implements the dynamic escape detection algorithm as described by Stoller and Wang.

Version:
12/13/2005
Author:
Alex Kinneer

Nested Class Summary
 
Nested classes/interfaces inherited from interface sofya.ed.semantic.EventListener
EventListener.Arguments, EventListener.CallData, EventListener.ExceptionData, EventListener.FieldData, EventListener.MethodData, EventListener.MonitorData, EventListener.NewAllocationData, EventListener.ObjectData, EventListener.ThreadData, EventListener.ThreadStatus
 
Field Summary
 
Fields inherited from class sofya.ed.semantic.EventFilter
listenerCount, listeners
 
Constructor Summary
DynamicEscapeDetector()
          Creates a new dynamic escape detector.
 
Method Summary
 void constructorEnterEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MethodData md)
          Notification that a constructor was entered.
 void instanceFieldWriteEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.FieldData fd)
          Notification that an instance field was written.
 void interfaceCallEvent(EventListener.ThreadData td, EventListener.CallData cd)
          Notification that an interface method was called.
 boolean isEscaped(long objectId)
          Reports whether an given object has escaped from its creating thread.
 void staticCallEvent(EventListener.ThreadData td, EventListener.CallData cd)
          Notification that a static method was called.
 void staticFieldWriteEvent(EventListener.ThreadData td, EventListener.FieldData fd)
          Notification that a static field was written.
 void threadStartEvent(EventListener.ThreadData td)
          Notification that a thread has started.
 void virtualCallEvent(EventListener.ThreadData td, EventListener.CallData cd)
          Notification that a virtual method was called.
 
Methods inherited from class sofya.ed.semantic.EventSelectionFilter
callReturnEvent, classPrepareEvent, constructorCallEvent, constructorExitEvent, exceptionCatchEvent, exceptionThrowEvent, executionStarted, instanceFieldAccessEvent, monitorAcquireEvent, monitorContendEvent, monitorPreReleaseEvent, monitorReleaseEvent, newAllocationEvent, staticFieldAccessEvent, staticInitializerEnterEvent, staticMethodEnterEvent, staticMethodExitEvent, systemExited, systemStarted, threadDeathEvent, virtualMethodEnterEvent, virtualMethodExitEvent
 
Methods inherited from class sofya.ed.semantic.EventFilter
addEventListener, ensureCapacity, removeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicEscapeDetector

public DynamicEscapeDetector()
Creates a new dynamic escape detector.

Method Detail

isEscaped

public boolean isEscaped(long objectId)
Reports whether an given object has escaped from its creating thread.

Parameters:
objectId - ID of the object that should be checked for escape.
Returns:
true if the object has escaped (may be accessible by more than one thread).

threadStartEvent

public void threadStartEvent(EventListener.ThreadData td)
Description copied from interface: EventListener
Notification that a thread has started. These events are not dependent on the module description.

Specified by:
threadStartEvent in interface EventListener
Overrides:
threadStartEvent in class EventSelectionFilter
Parameters:
td - Information about the newly started thread.

instanceFieldWriteEvent

public void instanceFieldWriteEvent(EventListener.ThreadData td,
                                    EventListener.ObjectData od,
                                    EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that an instance field was written.

Specified by:
instanceFieldWriteEvent in interface EventListener
Overrides:
instanceFieldWriteEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field write occurred.
od - Information about the object which owns the written field.
fd - Information about the written field.

staticFieldWriteEvent

public void staticFieldWriteEvent(EventListener.ThreadData td,
                                  EventListener.FieldData fd)
Description copied from interface: EventListener
Notification that a static field was written.

Specified by:
staticFieldWriteEvent in interface EventListener
Overrides:
staticFieldWriteEvent in class EventSelectionFilter
Parameters:
td - Information about the thread in which the field write occurred.
fd - Information about the written field.

staticCallEvent

public void staticCallEvent(EventListener.ThreadData td,
                            EventListener.CallData cd)
Description copied from interface: EventListener
Notification that a static method was called.

Specified by:
staticCallEvent in interface EventListener
Overrides:
staticCallEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which called the method.
cd - Information about the called method.

virtualCallEvent

public void virtualCallEvent(EventListener.ThreadData td,
                             EventListener.CallData cd)
Description copied from interface: EventListener
Notification that a virtual method was called.

Specified by:
virtualCallEvent in interface EventListener
Overrides:
virtualCallEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which called the method.
cd - Information about the called method.

interfaceCallEvent

public void interfaceCallEvent(EventListener.ThreadData td,
                               EventListener.CallData cd)
Description copied from interface: EventListener
Notification that an interface method was called.

Specified by:
interfaceCallEvent in interface EventListener
Overrides:
interfaceCallEvent in class EventSelectionFilter
Parameters:
td - Information about the thread which called the method.
cd - Information about the called method.

constructorEnterEvent

public void constructorEnterEvent(EventListener.ThreadData td,
                                  EventListener.ObjectData od,
                                  EventListener.MethodData md)
Description copied from interface: EventListener
Notification that a constructor was entered.

This is the first point during the object creation process at which the object can be uniquely identified.

Specified by:
constructorEnterEvent in interface EventListener
Overrides:
constructorEnterEvent in class EventSelectionFilter
Parameters:
td - Information about the thread executing the constructor.
od - Information about the object under construction. At the time of this event, only the object ID will be valid.
md - Information about the entered constructor.