statsPrintf("%16s bytes maximum slop\n", temp);
statsPrintf("%16ld MB total memory in use (%ld MB lost due to fragmentation)\n\n",
- mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_)),
- (mblocks_allocated * MBLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_)));
+ peak_mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_)),
+ (peak_mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_)));
/* Print garbage collections in each gen */
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
{
nat i;
lnat sparks_created = 0;
+ lnat sparks_dud = 0;
lnat sparks_converted = 0;
- lnat sparks_pruned = 0;
+ lnat sparks_gcd = 0;
+ lnat sparks_fizzled = 0;
for (i = 0; i < n_capabilities; i++) {
sparks_created += capabilities[i].sparks_created;
+ sparks_dud += capabilities[i].sparks_dud;
sparks_converted += capabilities[i].sparks_converted;
- sparks_pruned += capabilities[i].sparks_pruned;
+ sparks_gcd += capabilities[i].sparks_gcd;
+ sparks_fizzled += capabilities[i].sparks_fizzled;
}
- statsPrintf(" SPARKS: %ld (%ld converted, %ld pruned)\n\n",
- sparks_created, sparks_converted, sparks_pruned);
+ statsPrintf(" SPARKS: %ld (%ld converted, %ld dud, %ld GC'd, %ld fizzled)\n\n",
+ sparks_created + sparks_dud, sparks_converted, sparks_dud, sparks_gcd, sparks_fizzled);
}
#endif
void
statDescribeGens(void)
{
- nat g, mut, lge;
+ nat g, mut, lge, i;
lnat live, slop;
lnat tot_live, tot_slop;
bdescr *bd;
tot_slop = 0;
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
mut = 0;
- for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) {
- mut += (bd->free - bd->start) * sizeof(W_);
+ for (i = 0; i < n_capabilities; i++) {
+ mut += countOccupied(capabilities[i].mut_lists[g]);
}
gen = &generations[g];