[project @ 2002-03-01 18:11:20 by keithw]
authorkeithw <unknown>
Fri, 1 Mar 2002 18:11:20 +0000 (18:11 +0000)
committerkeithw <unknown>
Fri, 1 Mar 2002 18:11:20 +0000 (18:11 +0000)
Fix bug in ticky-ticky stats (particularly obvious in
nofib/imaginary/queens) that was meaning some thunk entries were not
being counted in ENT_{STATIC,DYN}_THK_ctr.  Specifically, tick the
counter for the stg_sel and stg_ap thunks, as well as non-standard
thunks!

Also add TICK_UPDF_OMITTED into the stg_sel_noupd thunks (there are no
stg_ap_noupd thunks, or else I would have put it there too).

Also, fix a bug in the sense of the test for update squeezing when
printing (or not) ENT_PERM_IND: we don't print out ENT_PERM_IND unless
update squeezing is turned off, because it may be invalid (see note).
If someone needs this counter, please just remove the test entirely
and always print ENT_PERM_IND.

ghc/rts/StgStdThunks.hc
ghc/rts/Ticky.c

index c3d77ac..94c9151 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: StgStdThunks.hc,v 1.18 2001/11/22 14:25:12 simonmar Exp $
+ * $Id: StgStdThunks.hc,v 1.19 2002/03/01 18:11:20 keithw Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -56,6 +56,7 @@
   INFO_TABLE_SELECTOR(stg_sel_##offset##_upd_info, stg_sel_##offset##_upd_entry, offset,, EF_, "stg_sel" #offset "_upd_entry", "stg_sel" #offset "_upd_entry");\
   EF_(stg_sel_##offset##_upd_entry) {                                  \
     FB_                                                                        \
+      TICK_ENT_DYN_THK();  /* is it static or dynamic?? */              \
       STK_CHK_NP(UPD_FRAME_SIZE,1,);                                   \
       UPD_BH_UPDATABLE(&stg_sel_##offset##_upd_info);                  \
       LDV_ENTER(R1.cl);                                                        \
@@ -102,9 +103,11 @@ SELECTOR_CODE_UPD(15);
   INFO_TABLE_SELECTOR(stg_sel_##offset##_noupd_info, stg_sel_##offset##_noupd_entry, offset,, EF_, "stg_sel" #offset "_noupd_entry", "stg_sel" #offset "_noupd_entry");\
   EF_(stg_sel_##offset##_noupd_entry) {                                        \
     FB_                                                                        \
+      TICK_ENT_DYN_THK();  /* is it static or dynamic?? */              \
       STK_CHK_NP(NOUPD_FRAME_SIZE,1,)                                  \
       UPD_BH_SINGLE_ENTRY(&stg_sel_##offset##_noupd_info);             \
       LDV_ENTER(R1.cl);                                                        \
+      TICK_UPDF_OMITTED();                                             \
       ENTER_CCS(R1.p);                                                 \
       SAVE_CCCS(NOUPD_FRAME_SIZE);                                     \
       Sp[-NOUPD_FRAME_SIZE]=(W_)&stg_sel_ret_##offset##_noupd_info;    \
@@ -163,6 +166,7 @@ FN_(stg_ap_8_upd_entry);
 INFO_TABLE_SRT(stg_ap_1_upd_info,stg_ap_1_upd_entry,1,1,0,0,0,THUNK_1_0,,EF_,"stg_ap_1_upd_info","stg_ap_1_upd_info");
 FN_(stg_ap_1_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame),1,);
   UPD_BH_UPDATABLE(&stg_ap_1_upd_info);
   LDV_ENTER(R1.cl);
@@ -177,6 +181,7 @@ FN_(stg_ap_1_upd_entry) {
 INFO_TABLE_SRT(stg_ap_2_upd_info,stg_ap_2_upd_entry,2,0,0,0,0,THUNK_2_0,,EF_,"stg_ap_2_upd_info","stg_ap_2_upd_info");
 FN_(stg_ap_2_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+1,1,);
   UPD_BH_UPDATABLE(&stg_ap_2_upd_info);
   LDV_ENTER(R1.cl);
@@ -192,6 +197,7 @@ FN_(stg_ap_2_upd_entry) {
 INFO_TABLE_SRT(stg_ap_3_upd_info,stg_ap_3_upd_entry,3,0,0,0,0,THUNK,,EF_,"stg_ap_3_upd_info","stg_ap_3_upd_info");
 FN_(stg_ap_3_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+2,1,);
   UPD_BH_UPDATABLE(&stg_ap_3_upd_info);
   LDV_ENTER(R1.cl);
@@ -208,6 +214,7 @@ FN_(stg_ap_3_upd_entry) {
 INFO_TABLE_SRT(stg_ap_4_upd_info,stg_ap_4_upd_entry,4,0,0,0,0,THUNK,,EF_,"stg_ap_4_upd_info","stg_ap_4_upd_info");
 FN_(stg_ap_4_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+3,1,);
   UPD_BH_UPDATABLE(&stg_ap_4_upd_info);
   LDV_ENTER(R1.cl);
@@ -225,6 +232,7 @@ FN_(stg_ap_4_upd_entry) {
 INFO_TABLE_SRT(stg_ap_5_upd_info,stg_ap_5_upd_entry,5,0,0,0,0,THUNK,,EF_,"stg_ap_5_upd_info","stg_ap_5_upd_info");
 FN_(stg_ap_5_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+4,1,);
   UPD_BH_UPDATABLE(&stg_ap_5_upd_info);
   LDV_ENTER(R1.cl);
@@ -243,6 +251,7 @@ FN_(stg_ap_5_upd_entry) {
 INFO_TABLE_SRT(stg_ap_6_upd_info,stg_ap_6_upd_entry,6,0,0,0,0,THUNK,,EF_,"stg_ap_6_upd_info","stg_ap_6_upd_info");
 FN_(stg_ap_6_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+5,1,);
   UPD_BH_UPDATABLE(&stg_ap_6_upd_info);
   LDV_ENTER(R1.cl);
@@ -262,6 +271,7 @@ FN_(stg_ap_6_upd_entry) {
 INFO_TABLE_SRT(stg_ap_7_upd_info,stg_ap_7_upd_entry,7,0,0,0,0,THUNK,,EF_,"stg_ap_7_upd_info","stg_ap_7_upd_info");
 FN_(stg_ap_7_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+6,1,);
   UPD_BH_UPDATABLE(&stg_ap_7_upd_info);
   LDV_ENTER(R1.cl);
@@ -282,6 +292,7 @@ FN_(stg_ap_7_upd_entry) {
 INFO_TABLE_SRT(stg_ap_8_upd_info,stg_ap_8_upd_entry,8,0,0,0,0,THUNK,,EF_,"stg_ap_8_upd_info","stg_ap_8_upd_info");
 FN_(stg_ap_8_upd_entry) {
   FB_
+  TICK_ENT_DYN_THK();  /* is it static or dynamic?? */
   STK_CHK_NP(sizeofW(StgUpdateFrame)+7,1,);
   UPD_BH_UPDATABLE(&stg_ap_8_upd_info);
   LDV_ENTER(R1.cl);
index 0a3e813..5dd6cd3 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Ticky.c,v 1.14 2002/02/14 11:56:05 njn Exp $
+ * $Id: Ticky.c,v 1.15 2002/03/01 18:11:20 keithw Exp $
  *
  * (c) The AQUA project, Glasgow University, 1992-1997
  * (c) The GHC Team, 1998-1999
@@ -431,7 +431,7 @@ 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_PAP_ctr);
   PR_CTR(ENT_AP_UPD_ctr);