Skip to content

Commit 1b35d43

Browse files
committed
io-sim: EventUnblock
When an stm transaction is committed, trace threads which are unblocked by it. This is useful for debugging 'IOSim' or 'IOSimpPOR' itself.
1 parent 8a16b59 commit 1b35d43

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

io-sim/src/Control/Monad/IOSim/Internal.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ schedule thread@Thread{
432432
$ traceMany
433433
[ (time, tid, tlbl, EventLog tr)
434434
| tr <- tvarTraces ]
435+
$ SimTrace time tid tlbl (EventUnblocked unblocked)
435436
$ SimTrace time tid tlbl (EventDeschedule Yield)
436437
$ trace
437438

io-sim/src/Control/Monad/IOSim/Types.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ data SimEventType
782782
| EventAwaitControl StepId ScheduleControl
783783
| EventPerformAction StepId
784784
| EventReschedule ScheduleControl
785+
| EventUnblocked [ThreadId]
785786
deriving Show
786787

787788
type TraceEvent = SimEventType

io-sim/src/Control/Monad/IOSimPOR/Internal.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ schedule thread@Thread{
564564
[ (time, tid, (-1), tlbl, EventLog tr)
565565
| tr <- tvarTraces
566566
] $
567+
SimPORTrace time tid tstep tlbl (EventUnblocked unblocked) $
567568
SimPORTrace time tid tstep tlbl (EventDeschedule Yield) $
568569
trace
569570

0 commit comments

Comments
 (0)