Skip to content

Commit

Permalink
Decode more StgTSO fields
Browse files Browse the repository at this point in the history
  • Loading branch information
supersven committed May 10, 2020
1 parent 9951079 commit 2b48173
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/src/GHC/Debug/Decode/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ convertClosure g =
GHC.MVarClosure a1 a2 a3 a4 -> MVarClosure a1 a2 a3 a4
GHC.MutVarClosure a1 a2 -> MutVarClosure a1 a2
GHC.BlockingQueueClosure a1 a2 a3 a4 a5 -> BlockingQueueClosure a1 a2 a3 a4 a5
GHC.TSOClosure a1 a2 -> TSOClosure a1 a2
GHC.TSOClosure a1 a2 a3 a4 a5 a6 a7 -> TSOClosure a1 a2 a3 a4 a5 a6 a7
GHC.StackClosure a1 a2 a3 a4 a5 -> StackClosure a1 a2 a3 a4 a5
GHC.IntClosure a1 a2 -> IntClosure a1 a2
GHC.WordClosure a1 a2 -> WordClosure a1 a2
Expand Down
10 changes: 8 additions & 2 deletions common/src/GHC/Debug/Types/Closures.hs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ data DebugClosure string s b

| TSOClosure
{ info :: !StgInfoTable
, tsoStack :: !b
, _link :: !b
, global_link :: !b
, tsoStack :: !b -- ^ stackobj from StgTSO
, trec :: !b
, blocked_exceptions :: !b
, bq :: !b
}

| StackClosure
Expand Down Expand Up @@ -377,7 +382,8 @@ instance Tritraversable DebugClosure where
MutVarClosure a1 b -> MutVarClosure a1 <$> g b
BlockingQueueClosure a1 b1 b2 b3 b4 ->
BlockingQueueClosure a1 <$> g b1 <*> g b2 <*> g b3 <*> g b4
TSOClosure a1 b -> TSOClosure a1 <$> g b
TSOClosure a1 b1 b2 b3 b4 b5 b6 ->
(\c1 c2 c3 c4 c5 c6 -> TSOClosure a1 c1 c2 c3 c4 c5 c6) <$> g b1 <*> g b2 <*> g b3 <*> g b4 <*> g b5 <*> g b6
StackClosure a1 a2 a3 s1 ss -> StackClosure a1 a2 a3 <$> f s1 <*> pure ss
WeakClosure a1 a2 a3 a4 a5 a6 ->
WeakClosure a1 <$> g a2 <*> g a3 <*> g a4 <*> g a5 <*> traverse g a6
Expand Down

0 comments on commit 2b48173

Please sign in to comment.