projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-11-09 18:04:15 by sof]
[ghc-hetmet.git]
/
ghc
/
rts
/
Sanity.c
diff --git
a/ghc/rts/Sanity.c
b/ghc/rts/Sanity.c
index
383ef64
..
43e7b5a
100644
(file)
--- a/
ghc/rts/Sanity.c
+++ b/
ghc/rts/Sanity.c
@@
-1,5
+1,4
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Sanity.c,v 1.33 2003/04/22 16:25:12 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
*
* (c) The GHC Team, 1998-2001
*
@@
-26,7
+25,6
@@
#include "MBlock.h"
#include "Storage.h"
#include "Schedule.h"
#include "MBlock.h"
#include "Storage.h"
#include "Schedule.h"
-#include "StoragePriv.h" // for END_OF_STATIC_LIST
#include "Apply.h"
/* -----------------------------------------------------------------------------
#include "Apply.h"
/* -----------------------------------------------------------------------------
@@
-113,21
+111,21
@@
checkStackFrame( StgPtr c )
dyn = r->liveness;
p = (P_)(r->payload);
dyn = r->liveness;
p = (P_)(r->payload);
- checkSmallBitmap(p,GET_LIVENESS(r->liveness),RET_DYN_BITMAP_SIZE);
+ checkSmallBitmap(p,RET_DYN_LIVENESS(r->liveness),RET_DYN_BITMAP_SIZE);
p += RET_DYN_BITMAP_SIZE + RET_DYN_NONPTR_REGS_SIZE;
// skip over the non-pointers
p += RET_DYN_BITMAP_SIZE + RET_DYN_NONPTR_REGS_SIZE;
// skip over the non-pointers
- p += GET_NONPTRS(dyn);
+ p += RET_DYN_NONPTRS(dyn);
// follow the ptr words
// follow the ptr words
- for (size = GET_PTRS(dyn); size > 0; size--) {
+ for (size = RET_DYN_PTRS(dyn); size > 0; size--) {
checkClosureShallow((StgClosure *)*p);
p++;
}
return sizeofW(StgRetDyn) + RET_DYN_BITMAP_SIZE +
RET_DYN_NONPTR_REGS_SIZE +
checkClosureShallow((StgClosure *)*p);
p++;
}
return sizeofW(StgRetDyn) + RET_DYN_BITMAP_SIZE +
RET_DYN_NONPTR_REGS_SIZE +
- GET_NONPTRS(dyn) + GET_PTRS(dyn);
+ RET_DYN_NONPTRS(dyn) + RET_DYN_PTRS(dyn);
}
case UPDATE_FRAME:
}
case UPDATE_FRAME:
@@
-153,8
+151,8
@@
checkStackFrame( StgPtr c )
case RET_BIG: // large bitmap (> 32 entries)
case RET_VEC_BIG:
case RET_BIG: // large bitmap (> 32 entries)
case RET_VEC_BIG:
- size = info->i.layout.large_bitmap->size;
- checkLargeBitmap((StgPtr)c + 1, info->i.layout.large_bitmap, size);
+ size = GET_LARGE_BITMAP(&info->i)->size;
+ checkLargeBitmap((StgPtr)c + 1, GET_LARGE_BITMAP(&info->i), size);
return 1 + size;
case RET_FUN:
return 1 + size;
case RET_FUN:
@@
-165,18
+163,18
@@
checkStackFrame( StgPtr c )
ret_fun = (StgRetFun *)c;
fun_info = get_fun_itbl(ret_fun->fun);
size = ret_fun->size;
ret_fun = (StgRetFun *)c;
fun_info = get_fun_itbl(ret_fun->fun);
size = ret_fun->size;
- switch (fun_info->fun_type) {
+ switch (fun_info->f.fun_type) {
case ARG_GEN:
checkSmallBitmap((StgPtr)ret_fun->payload,
case ARG_GEN:
checkSmallBitmap((StgPtr)ret_fun->payload,
- BITMAP_BITS(fun_info->bitmap), size);
+ BITMAP_BITS(fun_info->f.bitmap), size);
break;
case ARG_GEN_BIG:
checkLargeBitmap((StgPtr)ret_fun->payload,
break;
case ARG_GEN_BIG:
checkLargeBitmap((StgPtr)ret_fun->payload,
- (StgLargeBitmap *)fun_info->bitmap, size);
+ GET_FUN_LARGE_BITMAP(fun_info), size);
break;
default:
checkSmallBitmap((StgPtr)ret_fun->payload,
break;
default:
checkSmallBitmap((StgPtr)ret_fun->payload,
- BITMAP_BITS(stg_arg_bitmaps[fun_info->fun_type]),
+ BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]),
size);
break;
}
size);
break;
}
@@
-355,14
+353,14
@@
checkClosure( StgClosure* p )
fun_info = get_fun_itbl(pap->fun);
p = (StgClosure *)pap->payload;
fun_info = get_fun_itbl(pap->fun);
p = (StgClosure *)pap->payload;
- switch (fun_info->fun_type) {
+ switch (fun_info->f.fun_type) {
case ARG_GEN:
checkSmallBitmap( (StgPtr)pap->payload,
case ARG_GEN:
checkSmallBitmap( (StgPtr)pap->payload,
- BITMAP_BITS(fun_info->bitmap), pap->n_args );
+ BITMAP_BITS(fun_info->f.bitmap), pap->n_args );
break;
case ARG_GEN_BIG:
checkLargeBitmap( (StgPtr)pap->payload,
break;
case ARG_GEN_BIG:
checkLargeBitmap( (StgPtr)pap->payload,
- (StgLargeBitmap *)fun_info->bitmap,
+ GET_FUN_LARGE_BITMAP(fun_info),
pap->n_args );
break;
case ARG_BCO:
pap->n_args );
break;
case ARG_BCO:
@@
-372,7
+370,7
@@
checkClosure( StgClosure* p )
break;
default:
checkSmallBitmap( (StgPtr)pap->payload,
break;
default:
checkSmallBitmap( (StgPtr)pap->payload,
- BITMAP_BITS(stg_arg_bitmaps[fun_info->fun_type]),
+ BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]),
pap->n_args );
break;
}
pap->n_args );
break;
}
@@
-610,6
+608,9
@@
checkTSO(StgTSO *tso)
case BlockedOnRead:
case BlockedOnWrite:
case BlockedOnDelay:
case BlockedOnRead:
case BlockedOnWrite:
case BlockedOnDelay:
+#if defined(mingw32_TARGET_OS)
+ case BlockedOnDoProc:
+#endif
/* isOnBQ(blocked_queue) */
break;
case BlockedOnException:
/* isOnBQ(blocked_queue) */
break;
case BlockedOnException:
@@
-643,18
+644,18
@@
checkTSOsSanity(void) {
nat i, tsos;
StgTSO *tso;
nat i, tsos;
StgTSO *tso;
- belch("Checking sanity of all runnable TSOs:");
+ debugBelch("Checking sanity of all runnable TSOs:");
for (i=0, tsos=0; i<RtsFlags.GranFlags.proc; i++) {
for (tso=run_queue_hds[i]; tso!=END_TSO_QUEUE; tso=tso->link) {
for (i=0, tsos=0; i<RtsFlags.GranFlags.proc; i++) {
for (tso=run_queue_hds[i]; tso!=END_TSO_QUEUE; tso=tso->link) {
- fprintf(stderr, "TSO %p on PE %d ...", tso, i);
+ debugBelch("TSO %p on PE %d ...", tso, i);
checkTSO(tso);
checkTSO(tso);
- fprintf(stderr, "OK, ");
+ debugBelch("OK, ");
tsos++;
}
}
tsos++;
}
}
- belch(" checked %d TSOs on %d PEs; ok\n", tsos, RtsFlags.GranFlags.proc);
+ debugBelch(" checked %d TSOs on %d PEs; ok\n", tsos, RtsFlags.GranFlags.proc);
}
}