[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / rts / Ticky.c
index c33fb25..92c18ea 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Ticky.c,v 1.6 1999/05/11 16:47:59 keithw Exp $
+ * $Id: Ticky.c,v 1.18 2004/08/13 13:11:08 simonmar Exp $
  *
  * (c) The AQUA project, Glasgow University, 1992-1997
  * (c) The GHC Team, 1998-1999
@@ -10,6 +10,7 @@
 #if defined(TICKY_TICKY)
 
 #define TICKY_C                        /* define those variables */
+#include "PosixSource.h"
 #include "Rts.h"
 #include "RtsFlags.h"
 #include "Ticky.h"
@@ -32,58 +33,73 @@ PrintTickyInfo(void)
   unsigned long i;
   unsigned long tot_allocs = /* total number of things allocated */
        ALLOC_FUN_ctr + ALLOC_SE_THK_ctr + ALLOC_UP_THK_ctr + ALLOC_CON_ctr + ALLOC_TUP_ctr +
-       ALLOC_TSO_ctr +
+       + ALLOC_TSO_ctr + ALLOC_BH_ctr  + ALLOC_PAP_ctr + ALLOC_PRIM_ctr
 #ifdef PAR
-       ALLOC_FMBQ_ctr + ALLOC_FME_ctr + ALLOC_BF_ctr +
+       + ALLOC_FMBQ_ctr + ALLOC_FME_ctr + ALLOC_BF_ctr
 #endif
-       ALLOC_BH_ctr  + ALLOC_UPD_PAP_ctr + ALLOC_PRIM_ctr;
+      ;        
 
   unsigned long tot_adm_wds = /* total number of admin words allocated */
-       ALLOC_FUN_adm + ALLOC_THK_adm + ALLOC_CON_adm + ALLOC_TUP_adm +
-       ALLOC_TSO_adm +
+       ALLOC_FUN_adm + ALLOC_THK_adm + ALLOC_CON_adm + ALLOC_TUP_adm
+       + ALLOC_TSO_adm + ALLOC_BH_adm  + ALLOC_PAP_adm + ALLOC_PRIM_adm
 #ifdef PAR
-       ALLOC_FMBQ_adm + ALLOC_FME_adm + ALLOC_BF_adm +
+       + ALLOC_FMBQ_adm + ALLOC_FME_adm + ALLOC_BF_adm
 #endif
-       ALLOC_BH_adm  + ALLOC_UPD_PAP_adm + ALLOC_PRIM_adm;
+      ;
 
   unsigned long tot_gds_wds = /* total number of words of ``good stuff'' allocated */
-       ALLOC_FUN_gds + ALLOC_THK_gds + ALLOC_CON_gds + ALLOC_TUP_gds +
-       ALLOC_TSO_gds +
+       ALLOC_FUN_gds + ALLOC_THK_gds + ALLOC_CON_gds + ALLOC_TUP_gds
+       + ALLOC_TSO_gds + ALLOC_BH_gds  + ALLOC_PAP_gds + ALLOC_PRIM_gds
 #ifdef PAR
-       ALLOC_FMBQ_gds + ALLOC_FME_gds + ALLOC_BF_gds +
+       + ALLOC_FMBQ_gds + ALLOC_FME_gds + ALLOC_BF_gds
 #endif
-
-       ALLOC_BH_gds  + ALLOC_UPD_PAP_gds + ALLOC_PRIM_gds;
+      ;
 
   unsigned long tot_slp_wds = /* total number of ``slop'' words allocated */
-       ALLOC_FUN_slp + ALLOC_THK_slp + ALLOC_CON_slp + ALLOC_TUP_slp +
-       ALLOC_TSO_slp +
+       ALLOC_FUN_slp + ALLOC_THK_slp + ALLOC_CON_slp + ALLOC_TUP_slp
+       + ALLOC_TSO_slp + ALLOC_BH_slp  + ALLOC_PAP_slp + ALLOC_PRIM_slp
 #ifdef PAR
-       ALLOC_FMBQ_slp + ALLOC_FME_slp + ALLOC_BF_slp +
+       + ALLOC_FMBQ_slp + ALLOC_FME_slp + ALLOC_BF_slp
 #endif
-       ALLOC_BH_slp  + ALLOC_UPD_PAP_slp + ALLOC_PRIM_slp;
+      ;
 
   unsigned long tot_wds = /* total words */
        tot_adm_wds + tot_gds_wds + tot_slp_wds;
 
+  unsigned long tot_thk_enters = ENT_STATIC_THK_ctr + ENT_DYN_THK_ctr;
+  unsigned long tot_con_enters = ENT_STATIC_CON_ctr + ENT_DYN_CON_ctr;
+  unsigned long tot_fun_direct_enters = ENT_STATIC_FUN_DIRECT_ctr + ENT_DYN_FUN_DIRECT_ctr;
+  unsigned long tot_ind_enters = ENT_STATIC_IND_ctr + ENT_DYN_IND_ctr;
+  
+  // This is the number of times we entered a function via some kind
+  // of slow call.  It amounts to all the slow applications, not
+  // counting those that were to too few arguments.
+  unsigned long tot_fun_slow_enters = 
+      SLOW_CALL_ctr - 
+      SLOW_CALL_FUN_TOO_FEW_ctr -
+      SLOW_CALL_PAP_TOO_FEW_ctr;
+
+  unsigned long tot_known_calls =
+      KNOWN_CALL_ctr + KNOWN_CALL_TOO_FEW_ARGS_ctr + 
+      + KNOWN_CALL_EXTRA_ARGS_ctr;
+  unsigned long tot_tail_calls =
+      UNKNOWN_CALL_ctr + tot_known_calls;
+
   unsigned long tot_enters =
-       ENT_CON_ctr + ENT_FUN_DIRECT_ctr +
-       ENT_IND_ctr + ENT_PERM_IND_ctr + ENT_PAP_ctr + ENT_THK_ctr;
+       tot_con_enters + tot_fun_direct_enters +
+       tot_ind_enters + ENT_PERM_IND_ctr + ENT_PAP_ctr + tot_thk_enters;
   unsigned long jump_direct_enters =
        tot_enters - ENT_VIA_NODE_ctr;
-  unsigned long bypass_enters =
-       ENT_FUN_DIRECT_ctr -
-       (ENT_FUN_STD_ctr - UPD_PAP_IN_NEW_ctr);
 
   unsigned long tot_returns =
-       RET_NEW_ctr + RET_OLD_ctr + RET_UNBOXED_TUP_ctr +
-        RET_SEMI_IN_HEAP_ctr + RET_SEMI_BY_DEFAULT_ctr/*?*/;
+      RET_NEW_ctr + RET_OLD_ctr + RET_UNBOXED_TUP_ctr;
 
   unsigned long tot_returns_of_new = RET_NEW_ctr;
 
+  unsigned long con_updates = UPD_CON_IN_NEW_ctr + UPD_CON_IN_PLACE_ctr;
   unsigned long pap_updates = UPD_PAP_IN_NEW_ctr + UPD_PAP_IN_PLACE_ctr;
 
-  unsigned long tot_updates = UPD_EXISTING_ctr + UPD_SQUEEZED_ctr + pap_updates;
+  unsigned long tot_updates = UPD_SQUEEZED_ctr + pap_updates + con_updates;
 
   unsigned long tot_new_updates   = UPD_NEW_IND_ctr + UPD_NEW_PERM_IND_ctr;
   unsigned long tot_old_updates   = UPD_OLD_IND_ctr + UPD_OLD_PERM_IND_ctr;
@@ -143,10 +159,10 @@ PrintTickyInfo(void)
       fprintf(tf,"\t\t\t%5.1f %5.1f %5.1f %5.1f %5.1f", ALLOC_HISTO_MAGIC(PRIM));
 
   fprintf(tf,"\n%7ld (%5.1f%%) partial applications",
-       ALLOC_UPD_PAP_ctr,
-       PC(INTAVG(ALLOC_UPD_PAP_ctr, tot_allocs)));
-  if (ALLOC_UPD_PAP_ctr != 0)
-      fprintf(tf,"\t\t%5.1f %5.1f %5.1f %5.1f %5.1f", ALLOC_HISTO_MAGIC(UPD_PAP));
+       ALLOC_PAP_ctr,
+       PC(INTAVG(ALLOC_PAP_ctr, tot_allocs)));
+  if (ALLOC_PAP_ctr != 0)
+      fprintf(tf,"\t\t%5.1f %5.1f %5.1f %5.1f %5.1f", ALLOC_HISTO_MAGIC(PAP));
 
   fprintf(tf,"\n%7ld (%5.1f%%) thread state objects",
        ALLOC_TSO_ctr,
@@ -181,26 +197,34 @@ PrintTickyInfo(void)
        jump_direct_enters,
        PC(INTAVG(jump_direct_enters,tot_enters)));
   fprintf(tf,"%7ld (%5.1f%%) thunks\n",
-       ENT_THK_ctr,
-       PC(INTAVG(ENT_THK_ctr,tot_enters)));
+       tot_thk_enters,
+       PC(INTAVG(tot_thk_enters,tot_enters)));
   fprintf(tf,"%7ld (%5.1f%%) data values\n",
-       ENT_CON_ctr,
-       PC(INTAVG(ENT_CON_ctr,tot_enters)));
-  fprintf(tf,"%7ld (%5.1f%%) function values\n\t\t  [of which %ld (%.1f%%) bypassed arg-satisfaction chk]\n",
-       ENT_FUN_DIRECT_ctr,
-       PC(INTAVG(ENT_FUN_DIRECT_ctr,tot_enters)),
-       bypass_enters,
-       PC(INTAVG(bypass_enters,ENT_FUN_DIRECT_ctr)));
-  fprintf(tf,"%7ld (%5.1f%%) partial applications\n",
-       ENT_PAP_ctr,
-       PC(INTAVG(ENT_PAP_ctr,tot_enters)));
+       tot_con_enters,
+       PC(INTAVG(tot_con_enters,tot_enters)));
   fprintf(tf,"%7ld (%5.1f%%) normal indirections\n",
-       ENT_IND_ctr,
-       PC(INTAVG(ENT_IND_ctr,tot_enters)));
+       tot_ind_enters,
+       PC(INTAVG(tot_ind_enters,tot_enters)));
   fprintf(tf,"%7ld (%5.1f%%) permanent indirections\n",
        ENT_PERM_IND_ctr,
        PC(INTAVG(ENT_PERM_IND_ctr,tot_enters)));
 
+  fprintf(tf,"\nFUNCTION ENTRIES: %ld\n", tot_fun_direct_enters);
+
+  fprintf(tf, "\nTAIL CALLS: %ld, of which %ld (%.lf%%) were to known functions\n", 
+         tot_tail_calls, tot_known_calls,
+         PC(INTAVG(tot_known_calls,tot_tail_calls)));
+
+  fprintf(tf, "\nSLOW APPLICATIONS: %ld evaluated, %ld unevaluated\n",
+         SLOW_CALL_ctr, SLOW_CALL_UNEVALD_ctr);
+  fprintf(tf, "\n");
+  fprintf(tf, "         Too few args   Correct args   Too many args\n");
+  fprintf(tf, "   FUN     %8ld       %8ld        %8ld\n", 
+         SLOW_CALL_FUN_TOO_FEW_ctr, SLOW_CALL_FUN_CORRECT_ctr, SLOW_CALL_FUN_TOO_MANY_ctr);
+  fprintf(tf, "   PAP     %8ld       %8ld        %8ld\n", 
+         SLOW_CALL_PAP_TOO_FEW_ctr, SLOW_CALL_PAP_CORRECT_ctr, SLOW_CALL_PAP_TOO_MANY_ctr);
+  fprintf(tf, "\n");
+
   fprintf(tf,"\nRETURNS: %ld\n", tot_returns);
   fprintf(tf,"%7ld (%5.1f%%) from entering a new constructor\n\t\t  [the rest from entering an existing constructor]\n",
        tot_returns_of_new,
@@ -231,8 +255,6 @@ PrintTickyInfo(void)
        UPDF_PUSHED_ctr,
        UPDF_OMITTED_ctr);
 
-  fprintf(tf,"\nSEQ FRAMES:    %ld", SEQF_PUSHED_ctr);
-
   fprintf(tf,"\nCATCH FRAMES:  %ld", CATCHF_PUSHED_ctr);
 
   if (UPDF_RCC_PUSHED_ctr != 0)
@@ -241,30 +263,33 @@ PrintTickyInfo(void)
        UPDF_RCC_OMITTED_ctr);
 
   fprintf(tf,"\nUPDATES: %ld\n", tot_updates);
-  fprintf(tf,"%7ld (%5.1f%%) data values\n",
-       UPD_CON_IN_NEW_ctr,
-       PC(INTAVG(UPD_CON_IN_NEW_ctr,tot_updates)));
+  fprintf(tf,"%7ld (%5.1f%%) data values\n\t\t  [%ld in place, %ld allocated new space]\n",
+       con_updates,
+       PC(INTAVG(con_updates,tot_updates)),
+       UPD_CON_IN_PLACE_ctr, UPD_CON_IN_NEW_ctr);
   fprintf(tf,"%7ld (%5.1f%%) partial applications\n\t\t  [%ld in place, %ld allocated new space]\n",
        pap_updates,
        PC(INTAVG(pap_updates,tot_updates)),
        UPD_PAP_IN_PLACE_ctr, UPD_PAP_IN_NEW_ctr);
-  fprintf(tf,"%7ld (%5.1f%%) updates to existing heap objects (%ld by squeezing)\n",
-       UPD_EXISTING_ctr + UPD_SQUEEZED_ctr,
-       PC(INTAVG(UPD_EXISTING_ctr + UPD_SQUEEZED_ctr, tot_updates)),
-       UPD_SQUEEZED_ctr);
+  fprintf(tf,"%7ld (%5.1f%%) updates by squeezing\n",
+       UPD_SQUEEZED_ctr,
+       PC(INTAVG(UPD_SQUEEZED_ctr, tot_updates)));
 
-  fprintf(tf, "UPD_CON_IN_NEW:   %7ld: ", UPD_CON_IN_NEW_ctr);
+  fprintf(tf, "\nUPD_CON_IN_NEW:   %7ld: ", UPD_CON_IN_NEW_ctr);
   for (i = 0; i < 9; i++) { fprintf(tf, "%7ld", UPD_CON_IN_NEW_hst[i]); }
   fprintf(tf, "\n");
+  fprintf(tf, "UPD_CON_IN_PLACE: %7ld: ", UPD_CON_IN_PLACE_ctr);
+  for (i = 0; i < 9; i++) { fprintf(tf, "%7ld", UPD_CON_IN_PLACE_hst[i]); }
+  fprintf(tf, "\n");
   fprintf(tf, "UPD_PAP_IN_NEW:   %7ld: ", UPD_PAP_IN_NEW_ctr);
   for (i = 0; i < 9; i++) { fprintf(tf, "%7ld", UPD_PAP_IN_NEW_hst[i]); }
   fprintf(tf, "\n");
 
   if (tot_gengc_updates != 0) {
-      fprintf(tf,"\nNEW GEN UPDATES: %ld (%5.1f%%)\n",
+      fprintf(tf,"\nNEW GEN UPDATES: %9ld (%5.1f%%)\n",
              tot_new_updates,
              PC(INTAVG(tot_new_updates,tot_gengc_updates)));
-      fprintf(tf,"\nOLD GEN UPDATES: %ld (%5.1f%%)\n",
+      fprintf(tf,"OLD GEN UPDATES: %9ld (%5.1f%%)\n",
              tot_old_updates,
              PC(INTAVG(tot_old_updates,tot_gengc_updates)));
   }
@@ -272,9 +297,7 @@ PrintTickyInfo(void)
   fprintf(tf,"\nTotal bytes copied during GC: %ld\n",
          GC_WORDS_COPIED_ctr * sizeof(W_));
 
-#if 0
   printRegisteredCounterInfo(tf);
-#endif
 
   fprintf(tf,"\n**************************************************\n");
 
@@ -349,15 +372,15 @@ PrintTickyInfo(void)
   PR_HST(ALLOC_PRIM_hst,2);
   PR_HST(ALLOC_PRIM_hst,3);
   PR_HST(ALLOC_PRIM_hst,4);
-  PR_CTR(ALLOC_UPD_PAP_ctr);
-  PR_CTR(ALLOC_UPD_PAP_adm);
-  PR_CTR(ALLOC_UPD_PAP_gds);
-  PR_CTR(ALLOC_UPD_PAP_slp);
-  PR_HST(ALLOC_UPD_PAP_hst,0);
-  PR_HST(ALLOC_UPD_PAP_hst,1);
-  PR_HST(ALLOC_UPD_PAP_hst,2);
-  PR_HST(ALLOC_UPD_PAP_hst,3);
-  PR_HST(ALLOC_UPD_PAP_hst,4);
+  PR_CTR(ALLOC_PAP_ctr);
+  PR_CTR(ALLOC_PAP_adm);
+  PR_CTR(ALLOC_PAP_gds);
+  PR_CTR(ALLOC_PAP_slp);
+  PR_HST(ALLOC_PAP_hst,0);
+  PR_HST(ALLOC_PAP_hst,1);
+  PR_HST(ALLOC_PAP_hst,2);
+  PR_HST(ALLOC_PAP_hst,3);
+  PR_HST(ALLOC_PAP_hst,4);
 
   PR_CTR(ALLOC_TSO_ctr);
   PR_CTR(ALLOC_TSO_adm);
@@ -400,10 +423,12 @@ PrintTickyInfo(void)
 #endif
 
   PR_CTR(ENT_VIA_NODE_ctr);
-  PR_CTR(ENT_CON_ctr);
-  PR_CTR(ENT_FUN_STD_ctr);
-  PR_CTR(ENT_FUN_DIRECT_ctr);
-  PR_CTR(ENT_IND_ctr);
+  PR_CTR(ENT_STATIC_CON_ctr);
+  PR_CTR(ENT_DYN_CON_ctr);
+  PR_CTR(ENT_STATIC_FUN_DIRECT_ctr);
+  PR_CTR(ENT_DYN_FUN_DIRECT_ctr);
+  PR_CTR(ENT_STATIC_IND_ctr);
+  PR_CTR(ENT_DYN_IND_ctr);
 
 /* The counters ENT_PERM_IND and UPD_{NEW,OLD}_PERM_IND are not dumped
  * at the end of execution unless update squeezing is turned off (+RTS
@@ -418,20 +443,57 @@ PrintTickyInfo(void)
  * 
  * This of course refers to the -ticky version that uses PERM_INDs to
  * determine the number of closures entered 0/1/>1.  KSW 1999-04.  */
-  COND_PR_CTR(ENT_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsTrue,"E!NT_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(ENT_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsFalse,"E!NT_PERM_IND_ctr requires +RTS -Z");
 
+  PR_CTR(ENT_AP_ctr);
   PR_CTR(ENT_PAP_ctr);
-  PR_CTR(ENT_AP_UPD_ctr);
+  PR_CTR(ENT_AP_STACK_ctr);
   PR_CTR(ENT_BH_ctr);
-  PR_CTR(ENT_THK_ctr);
+  PR_CTR(ENT_STATIC_THK_ctr);
+  PR_CTR(ENT_DYN_THK_ctr);
+
+  PR_CTR(SLOW_CALL_v_ctr);
+  PR_CTR(SLOW_CALL_f_ctr);
+  PR_CTR(SLOW_CALL_d_ctr);
+  PR_CTR(SLOW_CALL_l_ctr);
+  PR_CTR(SLOW_CALL_n_ctr);
+  PR_CTR(SLOW_CALL_p_ctr);
+  PR_CTR(SLOW_CALL_pv_ctr);
+  PR_CTR(SLOW_CALL_pp_ctr);
+  PR_CTR(SLOW_CALL_ppv_ctr);
+  PR_CTR(SLOW_CALL_ppp_ctr);
+  PR_CTR(SLOW_CALL_pppv_ctr);
+  PR_CTR(SLOW_CALL_pppp_ctr);
+  PR_CTR(SLOW_CALL_ppppp_ctr);
+  PR_CTR(SLOW_CALL_pppppp_ctr);
+  PR_CTR(SLOW_CALL_OTHER_ctr);
+
+  PR_CTR(UNKNOWN_CALL_ctr);
+  PR_CTR(KNOWN_CALL_ctr);
+  PR_CTR(KNOWN_CALL_TOO_FEW_ARGS_ctr);
+  PR_CTR(KNOWN_CALL_EXTRA_ARGS_ctr);
+  PR_CTR(MULTI_CHUNK_SLOW_CALL_ctr);
+  PR_CTR(MULTI_CHUNK_SLOW_CALL_CHUNKS_ctr);
+  PR_CTR(SLOW_CALL_ctr);
+  PR_CTR(SLOW_CALL_FUN_TOO_FEW_ctr);
+  PR_CTR(SLOW_CALL_FUN_CORRECT_ctr);
+  PR_CTR(SLOW_CALL_FUN_TOO_MANY_ctr);
+  PR_CTR(SLOW_CALL_PAP_TOO_FEW_ctr);
+  PR_CTR(SLOW_CALL_PAP_CORRECT_ctr);
+  PR_CTR(SLOW_CALL_PAP_TOO_MANY_ctr);
+  PR_CTR(SLOW_CALL_UNEVALD_ctr);
+  PR_HST(SLOW_CALL_hst,0);
+  PR_HST(SLOW_CALL_hst,1);
+  PR_HST(SLOW_CALL_hst,2);
+  PR_HST(SLOW_CALL_hst,3);
+  PR_HST(SLOW_CALL_hst,4);
+  PR_HST(SLOW_CALL_hst,5);
+  PR_HST(SLOW_CALL_hst,6);
+  PR_HST(SLOW_CALL_hst,7);
 
   PR_CTR(RET_NEW_ctr);
   PR_CTR(RET_OLD_ctr);
   PR_CTR(RET_UNBOXED_TUP_ctr);
-  PR_CTR(RET_SEMI_BY_DEFAULT_ctr);
-  PR_CTR(RET_SEMI_IN_HEAP_ctr);
-  PR_CTR(RET_SEMI_FAILED_IND_ctr);
-  PR_CTR(RET_SEMI_FAILED_UNEVAL_ctr);
   PR_CTR(VEC_RETURN_ctr);
 
   PR_HST(RET_NEW_hst,0);
@@ -461,15 +523,6 @@ PrintTickyInfo(void)
   PR_HST(RET_UNBOXED_TUP_hst,6);
   PR_HST(RET_UNBOXED_TUP_hst,7);
   PR_HST(RET_UNBOXED_TUP_hst,8);
-  PR_HST(RET_SEMI_IN_HEAP_hst,0);
-  PR_HST(RET_SEMI_IN_HEAP_hst,1);
-  PR_HST(RET_SEMI_IN_HEAP_hst,2);
-  PR_HST(RET_SEMI_IN_HEAP_hst,3);
-  PR_HST(RET_SEMI_IN_HEAP_hst,4);
-  PR_HST(RET_SEMI_IN_HEAP_hst,5);
-  PR_HST(RET_SEMI_IN_HEAP_hst,6);
-  PR_HST(RET_SEMI_IN_HEAP_hst,7);
-  PR_HST(RET_SEMI_IN_HEAP_hst,8);
   PR_HST(RET_VEC_RETURN_hst,0);
   PR_HST(RET_VEC_RETURN_hst,1);
   PR_HST(RET_VEC_RETURN_hst,2);
@@ -480,19 +533,16 @@ PrintTickyInfo(void)
   PR_HST(RET_VEC_RETURN_hst,7);
   PR_HST(RET_VEC_RETURN_hst,8);
 
-  PR_CTR(RET_SEMI_loads_avoided);
-
   PR_CTR(UPDF_OMITTED_ctr);
   PR_CTR(UPDF_PUSHED_ctr);
-  PR_CTR(SEQF_PUSHED_ctr);
   PR_CTR(CATCHF_PUSHED_ctr);
 
   PR_CTR(UPDF_RCC_PUSHED_ctr);
   PR_CTR(UPDF_RCC_OMITTED_ctr);
 
-  PR_CTR(UPD_EXISTING_ctr);
   PR_CTR(UPD_SQUEEZED_ctr);
   PR_CTR(UPD_CON_IN_NEW_ctr);
+  PR_CTR(UPD_CON_IN_PLACE_ctr);
   PR_CTR(UPD_PAP_IN_NEW_ctr);
   PR_CTR(UPD_PAP_IN_PLACE_ctr);
 
@@ -522,10 +572,10 @@ PrintTickyInfo(void)
 
   PR_CTR(UPD_NEW_IND_ctr);
   /* see comment on ENT_PERM_IND_ctr */
-  COND_PR_CTR(UPD_NEW_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsTrue,"U!PD_NEW_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(UPD_NEW_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsFalse,"U!PD_NEW_PERM_IND_ctr requires +RTS -Z");
   PR_CTR(UPD_OLD_IND_ctr);
   /* see comment on ENT_PERM_IND_ctr */
-  COND_PR_CTR(UPD_OLD_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsTrue,"U!PD_OLD_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(UPD_OLD_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == rtsFalse,"U!PD_OLD_PERM_IND_ctr requires +RTS -Z");
 
   PR_CTR(GC_SEL_ABANDONED_ctr);
   PR_CTR(GC_SEL_MINOR_ctr);
@@ -534,42 +584,46 @@ PrintTickyInfo(void)
   PR_CTR(GC_WORDS_COPIED_ctr);
 }
 
-#if 0
 /* Data structure used in ``registering'' one of these counters. */
 
-struct ent_counter *ListOfEntryCtrs = NULL; /* root of list of them */
+StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */
 
 /* To print out all the registered-counter info: */
 
 static void
 printRegisteredCounterInfo (FILE *tf)
 {
-    struct ent_counter *p;
+    StgEntCounter *p;
 
-    if ( ListOfEntryCtrs != NULL ) {
-       fprintf(tf,"\n**************************************************\n");
+    if ( ticky_entry_ctrs != NULL ) {
+      fprintf(tf,"\n**************************************************\n\n");
     }
-
-    for (p = ListOfEntryCtrs; p != NULL; p = p->link) {
-       /* common stuff first; then the wrapper info if avail */
-       fprintf(tf, "%-40s%u\t%u\t%u\t%-16s%ld",
-               p->f_str,
+    fprintf(tf, "%11s%11s %6s%6s    %-11s%-30s\n",
+           "Entries", "Allocs", "Arity", "Stack", "Kinds", "Function");
+    fprintf(tf, "--------------------------------------------------------------------------------\n");
+    /* Function name at the end so it doesn't mess up the tabulation */
+
+    for (p = ticky_entry_ctrs; p != NULL; p = p->link) {
+       fprintf(tf, "%11ld%11ld %6u%6u    %-11s%-30s",
+               p->entry_count,
+               p->allocs,
                p->arity,
-               p->Astk_args,
-               p->Bstk_args,
-               p->f_arg_kinds,
-               p->ctr);
-
-       if ( p->wrap_str == NULL ) {
-           fprintf(tf, "\n");
-
-       } else {
-           fprintf(tf, "\t%s\t%s\n",
-               p->wrap_str,
-               p->wrap_arg_kinds);
-       }
+               p->stk_args,
+               p->arg_kinds,
+               p->str);
+
+       fprintf(tf, "\n");
+
     }
 }
-#endif
+
+/* Catch-all top-level counter struct.  Allocations from CAFs will go
+ * here.
+ */
+StgEntCounter top_ct
+        = { 0, 0, 0,
+           "TOP", "",
+           0, 0, NULL };
 
 #endif /* TICKY_TICKY */
+