Remove the per-generation mutable lists
[ghc-hetmet.git] / rts / Stats.c
index e519c94..cbd02cd 100644 (file)
@@ -636,16 +636,20 @@ stat_exit(int alloc)
             {
                 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
 
@@ -767,7 +771,7 @@ stat_exit(int alloc)
 void
 statDescribeGens(void)
 {
-  nat g, mut, lge;
+  nat g, mut, lge, i;
   lnat live, slop;
   lnat tot_live, tot_slop;
   bdescr *bd;
@@ -783,8 +787,8 @@ statDescribeGens(void)
   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];