|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.ed.semantic.EventFilter sofya.ed.semantic.EventSelectionFilter sofya.apps.atomicity.MultiLocksetRaceDetector
public final class MultiLocksetRaceDetector
Implements the multi-lockset race detection algorithm for fields described by Wang and Stoller.
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 | |
---|---|
MultiLocksetRaceDetector(DynamicEscapeDetector escapeDetector,
HappenBeforeChecker hbChecker,
boolean objectSensitive)
Creates a new multi-lockset race detector. |
Method Summary | |
---|---|
void |
constructorEnterEvent(EventListener.ThreadData td,
EventListener.ObjectData od,
EventListener.MethodData md)
Notification that a constructor was entered. |
void |
instanceFieldAccessEvent(EventListener.ThreadData td,
EventListener.ObjectData od,
EventListener.FieldData fd)
Notification that an instance field was read. |
void |
instanceFieldWriteEvent(EventListener.ThreadData td,
EventListener.ObjectData od,
EventListener.FieldData fd)
Notification that an instance field was written. |
boolean |
isPossibleRace(int threadId,
long objectId,
java.lang.String fieldName,
boolean isWrite)
Tests whether a field is believed to be involved in a data race. |
void |
staticFieldAccessEvent(EventListener.ThreadData td,
EventListener.FieldData fd)
Notification that a static field was read. |
void |
staticFieldWriteEvent(EventListener.ThreadData td,
EventListener.FieldData fd)
Notification that a static field was written. |
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 |
---|
public MultiLocksetRaceDetector(DynamicEscapeDetector escapeDetector, HappenBeforeChecker hbChecker, boolean objectSensitive)
objectSensitive
- Specifies whether race detection should
treat field of every object instance as distinct.Method Detail |
---|
public boolean isPossibleRace(int threadId, long objectId, java.lang.String fieldName, boolean isWrite)
threadId
- ID of the thread performing the field related
operation.objectId
- ID of the object that owns the field. Any negative
value is permitted for static fields, but the value should be
consistent.fieldName
- Fully qualified name of the field.
true
if the multi-lockset race detection
believes the field is involved in a data race, false
otherwise.public void staticFieldAccessEvent(EventListener.ThreadData td, EventListener.FieldData fd)
EventListener
staticFieldAccessEvent
in interface EventListener
staticFieldAccessEvent
in class EventSelectionFilter
td
- Information about the thread in which the field access
occurred.fd
- Information about the accessed field.public void instanceFieldAccessEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.FieldData fd)
EventListener
instanceFieldAccessEvent
in interface EventListener
instanceFieldAccessEvent
in class EventSelectionFilter
td
- Information about the thread in which the field access
occurred.od
- Information about the object which owns the accessed field.fd
- Information about the accessed field.public void staticFieldWriteEvent(EventListener.ThreadData td, EventListener.FieldData fd)
EventListener
staticFieldWriteEvent
in interface EventListener
staticFieldWriteEvent
in class EventSelectionFilter
td
- Information about the thread in which the field write
occurred.fd
- Information about the written field.public void instanceFieldWriteEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.FieldData fd)
EventListener
instanceFieldWriteEvent
in interface EventListener
instanceFieldWriteEvent
in class EventSelectionFilter
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.public void constructorEnterEvent(EventListener.ThreadData td, EventListener.ObjectData od, EventListener.MethodData md)
EventListener
This is the first point during the object creation process at which the object can be uniquely identified.
constructorEnterEvent
in interface EventListener
constructorEnterEvent
in class EventSelectionFilter
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |