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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d9c0276afd483dcbf7f68485ee38f14434d808f3

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

commit d9c0276afd483dcbf7f68485ee38f14434d808f3
Author: Simon Marlow <[email protected]>
Date:   Wed Aug 29 12:50:08 2012 +0100

    small improvements to findPtr() and the closure printer

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

 rts/Printer.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/rts/Printer.c b/rts/Printer.c
index 737fba4..156dbea 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -10,6 +10,7 @@
 #include "Rts.h"
 #include "rts/Bytecodes.h"  /* for InstrPtr */
 
+#include "sm/Storage.h"
 #include "Printer.h"
 #include "RtsUtils.h"
 
@@ -354,6 +355,10 @@ printClosure( StgClosure *obj )
       debugBelch(")\n"); 
       break;
 
+    case STACK:
+      debugBelch("STACK");
+      break;
+
 #if 0
       /* Symptomatic of a problem elsewhere, have it fall-through & fail */
     case EVACUATED:
@@ -938,13 +943,19 @@ findPtrBlocks (StgPtr p, bdescr *bd, StgPtr arr[], int 
arr_size, int i)
 void
 findPtr(P_ p, int follow)
 {
-  nat g;
+  nat g, n;
   bdescr *bd;
   const int arr_size = 1024;
   StgPtr arr[arr_size];
   int i = 0;
   searched = 0;
 
+  for (n = 0; n < n_capabilities; n++) {
+      bd = nurseries[i].blocks;
+      i = findPtrBlocks(p,bd,arr,arr_size,i);
+      if (i >= arr_size) return;
+  }
+
   for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
       bd = generations[g].blocks;
       i = findPtrBlocks(p,bd,arr,arr_size,i);



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to