[Git][ghc/ghc][master] 2 commits: hadrian: Remove STG dump from ticky_ghc flavour transformer

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jul 5 11:37:06 UTC 2024



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


Commits:
48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00
hadrian: Remove STG dump from ticky_ghc flavour transformer

This adds 10-15 minutes to build time, it is a better strategy to
precisely enable dumps for the modules which show up prominently in a
ticky profile.

Given I am one of the only people regularly building ticky compilers I
think it's worthwhile to remove these.

Fixes #23635

- - - - -
5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00
hadrian: Add dump_stg flavour transformer

This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you
really want STG for all modules.

- - - - -


2 changed files:

- hadrian/doc/flavours.md
- hadrian/src/Flavour.hs


Changes:

=====================================
hadrian/doc/flavours.md
=====================================
@@ -320,6 +320,10 @@ The supported transformers are listed below:
         <td><code>late_ccs</code></td>
         <td>Enable <code>-fprof-late</code> in profiled libraries.</td>
     </tr>
+    <tr>
+        <td><code>dump_stg</code></td>
+        <td>Dump STG of all modules compiled by a stage1 compiler to a file</td>
+    </tr>
 </table>
 
 ### Static


=====================================
hadrian/src/Flavour.hs
=====================================
@@ -68,6 +68,7 @@ flavourTransformers = M.fromList
     , "hi_core"          =: enableHiCore
     , "late_ccs"         =: enableLateCCS
     , "boot_nonmoving_gc" =: enableBootNonmovingGc
+    , "dump_stg"         =: enableDumpStg
     ]
   where (=:) = (,)
 
@@ -176,11 +177,13 @@ tickyArgs = mconcat
   [ arg "-ticky"
   , arg "-ticky-allocd"
   , arg "-ticky-dyn-thunk"
-  -- You generally need STG dumps to interpret ticky profiles
-  , arg "-ddump-to-file"
-  , arg "-ddump-stg-final"
   ]
 
+enableDumpStg :: Flavour -> Flavour
+enableDumpStg =
+  addArgs $ stage1 ?
+    builder (Ghc CompileHs) ? mconcat [ arg "-ddump-to-file", arg "-ddump-stg-final" ]
+
 -- | Enable Core, STG, and (not C--) linting in all compilations with the stage1 compiler.
 enableLinting :: Flavour -> Flavour
 enableLinting =



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a949c792388b5662dd199497541f9ad51c78d1a8...5b1aefb70edbd54ac899896df39d8f3d6c579518

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a949c792388b5662dd199497541f9ad51c78d1a8...5b1aefb70edbd54ac899896df39d8f3d6c579518
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/20240705/260c4b70/attachment-0001.html>


More information about the ghc-commits mailing list