[project @ 1999-02-05 14:44:43 by simonm]
[ghc-hetmet.git] / ghc / rts / Stats.c
index 1cbc0ba..061bbdd 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Stats.c,v 1.3 1999/01/13 17:25:46 simonm Exp $
+ * $Id: Stats.c,v 1.5 1999/02/03 16:42:18 simonm Exp $
  *
  * Statistics and timing-related functions.
  *
@@ -396,19 +396,22 @@ stat_exit(int alloc)
 void
 stat_describe_gens(void)
 {
-  nat g, s, mut, lge, live;
+  nat g, s, mut, mut_once, lge, live;
   StgMutClosure *m;
   bdescr *bd;
   step *step;
 
-  fprintf(stderr, "     Gen    Steps      Max   Mutable   Step  Blocks     Live    Large\n"       "                    Blocks  Closures                          Objects\n");
+  fprintf(stderr, "     Gen    Steps      Max   Mutable  Mut-Once  Step  Blocks     Live    Large\n                    Blocks  Closures  Closures                         Objects\n");
 
   for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
     for (m = generations[g].mut_list, mut = 0; m != END_MUT_LIST; 
         m = m->mut_link) 
       mut++;
-    fprintf(stderr, "%8d %8d %8d %9d", g, generations[g].n_steps,
-           generations[g].max_blocks, mut);
+    for (m = generations[g].mut_once_list, mut_once = 0; m != END_MUT_LIST; 
+        m = m->mut_link) 
+      mut_once++;
+    fprintf(stderr, "%8d %8d %8d %9d %9d", g, generations[g].n_steps,
+           generations[g].max_blocks, mut, mut_once);
 
     for (s = 0; s < generations[g].n_steps; s++) {
       step = &generations[g].steps[s];
@@ -419,7 +422,7 @@ stat_describe_gens(void)
        live += (bd->free - bd->start) * sizeof(W_);
       }
       if (s != 0) {
-       fprintf(stderr,"%36s","");
+       fprintf(stderr,"%46s","");
       }
       fprintf(stderr,"%6d %8d %8d %8d\n", s, step->n_blocks,
              live, lge);