Commit d9c0276a authored by Simon Marlow's avatar Simon Marlow
Browse files

small improvements to findPtr() and the closure printer

parent 6dd55e8a
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment