diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-08-29 12:50:08 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-08-31 16:43:58 +0100 |
commit | d9c0276afd483dcbf7f68485ee38f14434d808f3 (patch) | |
tree | 2ed5282125295a22202d082386b913f8d58a2e28 /rts/Printer.c | |
parent | 6dd55e8a056bb6a4281fc6d730df6ba54505a6e2 (diff) | |
download | haskell-d9c0276afd483dcbf7f68485ee38f14434d808f3.tar.gz |
small improvements to findPtr() and the closure printer
Diffstat (limited to 'rts/Printer.c')
-rw-r--r-- | rts/Printer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rts/Printer.c b/rts/Printer.c index 737fba4f20..156dbea37a 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); |