Cache the result of countOccupied(gen->large_objects) as gen->n_large_words (#7257)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 21 Sep 2012 12:18:49 +0000 (13:18 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 21 Sep 2012 12:46:47 +0000 (13:46 +0100)
commit016fd74d6517512b62b36ff12cdccf2e723a0fb3
treef5be8ca85dc2651ca63932b064f04baf9b7fe01f
parent1f5d83648dfda39d999eb8a9e8192339b3eea540
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).
includes/rts/storage/GC.h
rts/sm/GC.c
rts/sm/Storage.c