|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.vutbr.fit.racedetector.EraserDetect
public class EraserDetect
The implementation of the Eraser algorithm.
Eraser is a lock set based race condition detection algorithm. It maintains for each shared variable a set of locks used with it. The set is build at the first access (at the second access if owner transfer is enabled). Then the algorithm do intersection of this set and the set of locks currently owned by the thread at the time of an access to the variable. If the lockset becomes empty the race warning is produced.
To suppress false alarms a finite automata representing the phase in which the variable is currently present is maintained. The race warning is produced only if the variable is in the RACE state of the automata. For more information refer the article about Eraser.
The core of this algorithm is implemented in the ERVariable class
ERVariable
Field Summary | |
---|---|
protected static javolution.util.FastMap<javolution.util.Index,javolution.util.FastSet<javolution.util.Index>> |
joinSync
|
protected static javolution.util.FastMap<javolution.util.Index,java.lang.String> |
lockNames
|
protected static javolution.util.FastMap<javolution.util.Index,java.lang.String> |
threadNames
|
Constructor Summary | |
---|---|
EraserDetect()
|
Method Summary | |
---|---|
void |
afterAccessEvent(java.lang.String programLocation)
Operations performed after access to the variable. |
void |
beforeAccessEvent(java.lang.String programLocation,
java.lang.String varName,
java.lang.Object instance,
RaceDetector.Operation operation)
Operations performed before access to the variable. |
RDThread |
getNewThread()
Returns a new thread object. |
RDVariable |
getNewVariable(java.lang.Object inst,
java.lang.String str)
Returns a new variable object. |
void |
monitorEnterEvent(java.lang.String programLocation,
int lock)
Add a lock to the set of held locks. |
void |
monitorExitEvent(java.lang.String programLocation,
int lock)
Remove a lock from the set of held locks. |
void |
threadBeginEvent(java.lang.String programLocation)
Construct a data structure representing the thread. |
void |
threadEndEvent()
Clean a data structure representing the thread. |
void |
threadJoinEvent(java.lang.String programLocation,
java.lang.Thread target)
Join synchronization implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static javolution.util.FastMap<javolution.util.Index,java.lang.String> lockNames
protected static javolution.util.FastMap<javolution.util.Index,java.lang.String> threadNames
protected static javolution.util.FastMap<javolution.util.Index,javolution.util.FastSet<javolution.util.Index>> joinSync
Constructor Detail |
---|
public EraserDetect()
Method Detail |
---|
public RDVariable getNewVariable(java.lang.Object inst, java.lang.String str)
getNewVariable
in interface Detector
inst
- Variable instance - according to ConTest.str
- Name of the variable - according to ConTest.
public RDThread getNewThread()
getNewThread
in interface Detector
public void afterAccessEvent(java.lang.String programLocation)
public void beforeAccessEvent(java.lang.String programLocation, java.lang.String varName, java.lang.Object instance, RaceDetector.Operation operation)
public void monitorEnterEvent(java.lang.String programLocation, int lock)
public void monitorExitEvent(java.lang.String programLocation, int lock)
public void threadBeginEvent(java.lang.String programLocation)
public void threadEndEvent()
public void threadJoinEvent(java.lang.String programLocation, java.lang.Thread target)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |