[Git][ghc/ghc][wip/andreask/prof_docs] Document `-prof` and non `-prof` code being incompatible.

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Tue Dec 3 19:59:37 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/prof_docs at Glasgow Haskell Compiler / GHC


Commits:
45e900be by Andreas Klebinger at 2024-12-03T20:39:52+01:00
Document `-prof` and non `-prof` code being incompatible.

Fixes #25518.

- - - - -


1 changed file:

- docs/users_guide/profiling.rst


Changes:

=====================================
docs/users_guide/profiling.rst
=====================================
@@ -361,12 +361,17 @@ Compiler options for profiling
     :category:
 
     To make use of the profiling system *all* modules must be compiled
-    and linked with the :ghc-flag:`-prof` option. Any ``SCC`` annotations you've
+    and linked with the :ghc-flag:`-prof` option. Any :pragma:`SCC` annotations you've
     put in your source will spring to life.
 
-    Without a :ghc-flag:`-prof` option, your ``SCC``\ s are ignored; so you can
+    Without a :ghc-flag:`-prof` option, your :pragma:`SCC`\ s are ignored; so you can
     compile ``SCC``-laden code without changing it.
 
+    Since :ghc-flag:`-prof` affects not just code generation but also memory layout at runtime
+    code compiled with and without :ghc-flag:`-prof` is fundamentally incompatible.
+    To get a functional executable a project has to be built
+    either fully with or fully without :ghc-flag:`-prof`.
+
 .. ghc-flag:: -fno-prof-count-entries
     :shortdesc: Do not collect entry counts
     :type: dynamic



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/45e900bee822f258001c24dbcd67b486fdeb964f
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/20241203/9aa3b1c4/attachment-0001.html>


More information about the ghc-commits mailing list