summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-21 13:18:49 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-21 13:46:47 +0100
commit016fd74d6517512b62b36ff12cdccf2e723a0fb3 (patch)
treef5be8ca85dc2651ca63932b064f04baf9b7fe01f /includes
parent1f5d83648dfda39d999eb8a9e8192339b3eea540 (diff)
downloadhaskell-016fd74d6517512b62b36ff12cdccf2e723a0fb3.tar.gz
Cache the result of countOccupied(gen->large_objects) as gen->n_large_words (#7257)
The program in #7257 was spending 90% of its time counting the live data in gen->large_objects. We already avoid doing this for small objects, but in this example the old generation was full of large objects (actually pinned ByteStrings).
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/GC.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index fadaa8c1a4..a5f4ed6f36 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -75,6 +75,7 @@ typedef struct generation_ {
bdescr * large_objects; // large objects (doubly linked)
memcount n_large_blocks; // no. of blocks used by large objs
+ memcount n_large_words; // no. of words used by large objs
memcount n_new_large_words; // words of new large objects
// (for allocation stats)