[Git][ghc/ghc][master] rts: Build ticky GHC with single-threaded RTS

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu May 25 22:57:41 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
dc3422d4 by Matthew Pickering at 2023-05-25T18:57:19-04:00
rts: Build ticky GHC with single-threaded RTS

The threaded RTS allows you to use ticky profiling but only for the
counters in the generated code. The counters used in the C portion of
the RTS are disabled. Updating the counters is also racy using the
threaded RTS which can lead to misleading or incorrect ticky results.

Therefore we change the hadrian flavour to build using the
single-threaded RTS (mainly in order to get accurate C code counter
increments)

Fixes #23430

- - - - -


1 changed file:

- hadrian/src/Flavour.hs


Changes:

=====================================
hadrian/src/Flavour.hs
=====================================
@@ -145,11 +145,13 @@ enableDebugInfo = addArgs $ notStage0 ? mconcat
 
 -- | Enable the ticky-ticky profiler in stage2 GHC
 enableTickyGhc :: Flavour -> Flavour
-enableTickyGhc =
-    addArgs $ orM [stage1, cross] ? mconcat
+enableTickyGhc f =
+    (addArgs (orM [stage1, cross] ? mconcat
       [ builder (Ghc CompileHs) ? tickyArgs
       , builder (Ghc LinkHs) ? tickyArgs
-      ]
+      ]) f) { ghcThreaded = (< Stage2) }
+      -- Build single-threaded ghc because ticky profiling is racy with threaded
+      -- RTS and the C counters are disabled. (See #23439)
 
 tickyArgs :: Args
 tickyArgs = mconcat



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dc3422d44b89bcd4315075cafb4585d08e463180

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dc3422d44b89bcd4315075cafb4585d08e463180
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/20230525/a15d1fb5/attachment-0001.html>


More information about the ghc-commits mailing list