summaryrefslogtreecommitdiff
path: root/rts/RetainerProfile.c
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-05-29 20:05:51 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-05-29 20:05:51 -0700
commit723095b0e4c5838c7eefd757af56ab2a7c614801 (patch)
tree1581da2255fe571fc567992feb3422cebf3f59c7 /rts/RetainerProfile.c
parent0c1974c8262f1609ecb7dec438d8cd167f788a5c (diff)
downloadhaskell-723095b0e4c5838c7eefd757af56ab2a7c614801.tar.gz
Per-capability nursery weak pointer lists, fixes #9075
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r--rts/RetainerProfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index bdfc831b94..bfc96247aa 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -1781,6 +1781,12 @@ computeRetainerSet( void )
//
// The following code assumes that WEAK objects are considered to be roots
// for retainer profilng.
+ for (n = 0; n < n_capabilities; n++) {
+ // NB: after a GC, all nursery weak_ptr_lists have been migrated
+ // to the global lists living in the generations
+ ASSERT(capabilities[n]->weak_ptr_list_hd == NULL);
+ ASSERT(capabilities[n]->weak_ptr_list_tl == NULL);
+ }
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (weak = generations[g].weak_ptr_list; weak != NULL; weak = weak->link) {
// retainRoot((StgClosure *)weak);