diff options
| author | simonmar <unknown> | 2003-09-23 15:38:36 +0000 |
|---|---|---|
| committer | simonmar <unknown> | 2003-09-23 15:38:36 +0000 |
| commit | 76ebf3dcb916a1116302896090059c9c32ab5c6a (patch) | |
| tree | 23071063815db3f981e85a6663a6918cbd49a96d /ghc/rts/ProfHeap.c | |
| parent | 69373e1efb0acf58d793c2fd8d3416decbd1a571 (diff) | |
| download | haskell-76ebf3dcb916a1116302896090059c9c32ab5c6a.tar.gz | |
[project @ 2003-09-23 15:38:35 by simonmar]
Add a BF_PINNED block flag, and attach it to blocks containing pinned
objects (in addition to the usual BF_LARGE).
In heapCensus, we now ignore blocks containing pinned objects, because
they might contain gaps, and in any case it isn't clear that we want
to include the whole block in a heap census, because much of it might
well be dead. Ignoring it isn't right either, though, so this patch
just fixes the crash and leaves a ToDo.
Diffstat (limited to 'ghc/rts/ProfHeap.c')
| -rw-r--r-- | ghc/rts/ProfHeap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index 19beb9cba6..27a1a41312 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: ProfHeap.c,v 1.47 2003/08/22 22:24:12 sof Exp $ + * $Id: ProfHeap.c,v 1.48 2003/09/23 15:38:36 simonmar Exp $ * * (c) The GHC Team, 1998-2003 * @@ -825,6 +825,15 @@ heapCensusChain( Census *census, bdescr *bd ) rtsBool prim; for (; bd != NULL; bd = bd->link) { + + // HACK: ignore pinned blocks, because they contain gaps. + // It's not clear exactly what we'd like to do here, since we + // can't tell which objects in the block are actually alive. + // Perhaps the whole block should be counted as SYSTEM memory. + if (bd->flags & BF_PINNED) { + continue; + } + p = bd->start; while (p < bd->free) { info = get_itbl((StgClosure *)p); |
