#ifdef PROFILING
+#include "PosixSource.h"
#include "Rts.h"
-#include "LdvProfile.h"
-#include "RtsFlags.h"
+
#include "Profiling.h"
+#include "LdvProfile.h"
#include "Stats.h"
#include "RtsUtils.h"
#include "Schedule.h"
processHeapClosureForDead( StgClosure *c )
{
nat size;
- StgInfoTable *info;
+ const StgInfoTable *info;
info = get_itbl(c);
- if (info->type != EVACUATED) {
- ASSERT(((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) <= era &&
- ((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) > 0);
- ASSERT(((LDVW(c) & LDV_STATE_MASK) == LDV_STATE_CREATE) ||
- (
- (LDVW(c) & LDV_LAST_MASK) <= era &&
- (LDVW(c) & LDV_LAST_MASK) > 0
- ));
- }
-
- if (info->type == EVACUATED) {
+ info = c->header.info;
+ if (IS_FORWARDING_PTR(info)) {
// The size of the evacuated closure is currently stored in
// the LDV field. See SET_EVACUAEE_FOR_LDV() in
// includes/StgLdvProf.h.
return LDVW(c);
}
+ info = INFO_PTR_TO_STRUCT(info);
+
+ ASSERT(((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) <= era &&
+ ((LDVW(c) & LDV_CREATE_MASK) >> LDV_SHIFT) > 0);
+ ASSERT(((LDVW(c) & LDV_STATE_MASK) == LDV_STATE_CREATE) ||
+ (
+ (LDVW(c) & LDV_LAST_MASK) <= era &&
+ (LDVW(c) & LDV_LAST_MASK) > 0
+ ));
+
size = closure_sizeW(c);
case FUN_1_1:
case FUN_0_2:
case BLACKHOLE:
- case SE_BLACKHOLE:
case CAF_BLACKHOLE:
- case SE_CAF_BLACKHOLE:
case IND_PERM:
case IND_OLDGEN_PERM:
/*
case RET_SMALL:
case RET_BIG:
// others
- case BLOCKED_FETCH:
- case FETCH_ME:
- case FETCH_ME_BQ:
- case RBH:
- case REMOTE_REF:
case INVALID_OBJECT:
default:
barf("Invalid object in processHeapClosureForDead(): %d", info->type);
{
// Any object still in the chain is dead!
while (bd != NULL) {
- processHeapClosureForDead((StgClosure *)bd->start);
+ if (!(bd->flags & BF_PINNED)) {
+ processHeapClosureForDead((StgClosure *)bd->start);
+ }
bd = bd->link;
}
}