summaryrefslogtreecommitdiff
path: root/rts/Heap.c
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2020-11-09 19:58:37 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-28 15:41:37 -0500
commit625726f988852f5779825a954609d187d9865dc1 (patch)
tree2a871fce2ebd45d445e99914139155a068da995f /rts/Heap.c
parent698d3d9648e9cb6b3757269e21ce4fa1692a1a3b (diff)
downloadhaskell-625726f988852f5779825a954609d187d9865dc1.tar.gz
ghc-heap: partial TSO/STACK decoding
Co-authored-by: Sven Tennie <sven.tennie@gmail.com> Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by: Ben Gamari <bgamari.foss@gmail.com>
Diffstat (limited to 'rts/Heap.c')
-rw-r--r--rts/Heap.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/rts/Heap.c b/rts/Heap.c
index 509835eec1..627b91d5db 100644
--- a/rts/Heap.c
+++ b/rts/Heap.c
@@ -203,7 +203,26 @@ StgWord collect_pointers(StgClosure *closure, StgWord size, StgClosure *ptrs[siz
ptrs[nptrs++] = (StgClosure *)((StgMVar *)closure)->tail;
ptrs[nptrs++] = ((StgMVar *)closure)->value;
break;
+ case TSO:
+ ASSERT((StgClosure *)((StgTSO *)closure)->_link != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->_link;
+ ASSERT((StgClosure *)((StgTSO *)closure)->global_link != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->global_link;
+
+ ASSERT((StgClosure *)((StgTSO *)closure)->stackobj != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->stackobj;
+
+ ASSERT((StgClosure *)((StgTSO *)closure)->trec != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->trec;
+
+ ASSERT((StgClosure *)((StgTSO *)closure)->blocked_exceptions != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->blocked_exceptions;
+
+ ASSERT((StgClosure *)((StgTSO *)closure)->bq != NULL);
+ ptrs[nptrs++] = (StgClosure *)((StgTSO *)closure)->bq;
+
+ break;
case WEAK:
ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->cfinalizers;
ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->key;