[commit: ghc] master: Fix the profiling build (104b00d)

Simon Marlow marlowsd at gmail.com
Wed Feb 2 16:59:49 CET 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/104b00d80891ff1010905df517a9b9c465078c31

>---------------------------------------------------------------

commit 104b00d80891ff1010905df517a9b9c465078c31
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Feb 2 13:22:57 2011 +0000

    Fix the profiling build

>---------------------------------------------------------------

 rts/RetainerProfile.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index d125c9c..4bfda6f 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -1773,7 +1773,7 @@ computeRetainerSet( void )
 {
     StgWeak *weak;
     RetainerSet *rtl;
-    nat g;
+    nat g, n;
     StgPtr ml;
     bdescr *bd;
 #ifdef DEBUG_RETAINER
@@ -1804,7 +1804,8 @@ computeRetainerSet( void )
 	// Traversing through mut_list is necessary
 	// because we can find MUT_VAR objects which have not been
 	// visited during retainer profiling.
-	for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) {
+        for (n = 0; n < n_capabilities; n++) {
+          for (bd = capabilities[n].mut_lists[g]; bd != NULL; bd = bd->link) {
 	    for (ml = bd->start; ml < bd->free; ml++) {
 
 		maybeInitRetainerSet((StgClosure *)*ml);
@@ -1835,7 +1836,8 @@ computeRetainerSet( void )
 		}
 #endif
 	    }
-	}
+          }
+        }
     }
 }
 





More information about the Cvs-ghc mailing list