[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Define TICKY_TICKY when compiling cmm RTS files.

Marge Bot gitlab at gitlab.haskell.org
Fri Sep 11 08:39:09 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
6110305d by David Himmelstrup at 2020-09-11T04:39:01-04:00
Define TICKY_TICKY when compiling cmm RTS files.

- - - - -
fa77a695 by David Himmelstrup at 2020-09-11T04:39:01-04:00
Fix typos in TICKY_TICKY symbol names.

- - - - -
a38de0f2 by David Himmelstrup at 2020-09-11T04:39:02-04:00
Enable TICKY_TICKY for debug builds when building with makefiles.

- - - - -


5 changed files:

- hadrian/src/Settings/Packages.hs
- includes/Cmm.h
- includes/stg/Ticky.h
- mk/ways.mk
- rts/Ticky.c


Changes:

=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -279,7 +279,8 @@ rtsPackageArgs = package rts ? do
           , arg $ "-DFS_NAMESPACE=rts"
           , arg $ "-DCOMPILING_RTS"
           , notM targetSupportsSMP           ? arg "-DNOSMP"
-          , way `elem` [debug, debugDynamic] ? arg "-DTICKY_TICKY"
+          , way `elem` [debug, debugDynamic] ? pure [ "-DTICKY_TICKY"
+                                                    , "-optc-DTICKY_TICKY"]
           , Profiling `wayUnit` way          ? arg "-DPROFILING"
           , Threaded  `wayUnit` way          ? arg "-DTHREADED_RTS"
           , notM targetSupportsSMP           ? pure [ "-DNOSMP"


=====================================
includes/Cmm.h
=====================================
@@ -660,7 +660,11 @@
 #define TICK_BUMP(ctr)      TICK_BUMP_BY(ctr,1)
 
 #define TICK_ENT_DYN_IND()              TICK_BUMP(ENT_DYN_IND_ctr)
-#define TICK_ENT_DYN_THK()              TICK_BUMP(ENT_DYN_THK_ctr)
+// ENT_DYN_THK_ctr doesn't exist anymore. Could be ENT_DYN_THK_SINGLE_ctr or
+// ENT_DYN_THK_MANY_ctr
+// #define TICK_ENT_DYN_THK()              TICK_BUMP(ENT_DYN_THK_ctr)
+#define TICK_ENT_DYN_THK()
+
 #define TICK_ENT_VIA_NODE()             TICK_BUMP(ENT_VIA_NODE_ctr)
 #define TICK_ENT_STATIC_IND()           TICK_BUMP(ENT_STATIC_IND_ctr)
 #define TICK_ENT_PERM_IND()             TICK_BUMP(ENT_PERM_IND_ctr)


=====================================
includes/stg/Ticky.h
=====================================
@@ -199,18 +199,23 @@ EXTERN StgInt RET_UNBOXED_TUP_hst[TICKY_BIN_COUNT] INIT({0});
    TICKY_TICKY is defined or not. */
 
 #if !defined(CMINUSMINUS)
+#if defined(TICKY_TICKY)
 #define TICK_BUMP_BY(ctr,n) ctr = (StgInt) ctr + n
+#else
+#define TICK_BUMP_BY(ctr,n) /* nothing */
+#endif
+
 #define TICK_BUMP(ctr)      TICK_BUMP_BY(ctr,1)
 
-#define TICK_ALLOC_PRIM(x,y,z)
-#define TICK_UPD_OLD_IND()
-#define TICK_UPD_NEW_IND()
-#define TICK_UPD_SQUEEZED()
-#define TICK_ALLOC_HEAP_NOCTR(bytes)
-#define TICK_GC_FAILED_PROMOTION()
-#define TICK_ALLOC_TSO()
-#define TICK_ALLOC_STACK(g)
-#define TICK_ALLOC_UP_THK(g,s)
-#define TICK_ALLOC_SE_THK(g,s)
+#define TICK_ALLOC_PRIM(x,y,z)        // FIXME: update counter
+#define TICK_UPD_OLD_IND()            TICK_BUMP(UPD_OLD_IND_ctr)
+#define TICK_UPD_NEW_IND()            TICK_BUMP(UPD_NEW_IND_ctr)
+#define TICK_UPD_SQUEEZED()           TICK_BUMP(UPD_SQUEEZED_ctr)
+#define TICK_ALLOC_HEAP_NOCTR(bytes)  // FIXME: update counter
+#define TICK_GC_FAILED_PROMOTION()    // FIXME: update counter
+#define TICK_ALLOC_TSO()              // FIXME: update counter
+#define TICK_ALLOC_STACK(g)           // FIXME: update counter
+#define TICK_ALLOC_UP_THK(g,s)        // FIXME: update counter
+#define TICK_ALLOC_SE_THK(g,s)        // FIXME: update counter
 
 #endif


=====================================
mk/ways.mk
=====================================
@@ -70,7 +70,7 @@ WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog
 
 # Way 'debug':
 WAY_debug_NAME=debug
-WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
+WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY -eventlog
 
 # Way 'debug_p':
 WAY_debug_p_NAME=debug profiled
@@ -110,7 +110,7 @@ WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG -event
 
 # Way 'debug_dyn':
 WAY_debug_dyn_NAME=debug_dyn
-WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
+WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -optc-DTICKY_TICKY -eventlog
 
 # Way 'l_dyn':
 WAY_l_dyn_NAME=event logging dynamic


=====================================
rts/Ticky.c
=====================================
@@ -261,7 +261,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 == false,"E!NT_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(ENT_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == false,"ENT_PERM_IND_ctr requires +RTS -Z");
 
   PR_CTR(ENT_AP_ctr);
   PR_CTR(ENT_PAP_ctr);
@@ -334,10 +334,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 == false,"U!PD_NEW_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(UPD_NEW_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == false,"UPD_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 == false,"U!PD_OLD_PERM_IND_ctr requires +RTS -Z");
+  COND_PR_CTR(UPD_OLD_PERM_IND_ctr,RtsFlags.GcFlags.squeezeUpdFrames == false,"UPD_OLD_PERM_IND_ctr requires +RTS -Z");
 
   PR_CTR(GC_SEL_ABANDONED_ctr);
   PR_CTR(GC_SEL_MINOR_ctr);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d241dc01d4fd70c9018e193869e5d5641170d039...a38de0f2a41e81fe43bdb605a8f763bd9bdfe48c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d241dc01d4fd70c9018e193869e5d5641170d039...a38de0f2a41e81fe43bdb605a8f763bd9bdfe48c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200911/4fe9d88d/attachment-0001.html>


More information about the ghc-commits mailing list