[commit: ghc] wip/T16197: doc: behaviour of +RTS -h depends on profiling (6acb36d)

git at git.haskell.org git at git.haskell.org
Thu Jan 17 13:58:58 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T16197
Link       : http://ghc.haskell.org/trac/ghc/changeset/6acb36d8ea169dfc0ddc4e10559a9bf6b4316212/ghc

>---------------------------------------------------------------

commit 6acb36d8ea169dfc0ddc4e10559a9bf6b4316212
Author: Ben Price <ben at brprice.uk>
Date:   Tue Jan 15 12:38:44 2019 +0000

    doc: behaviour of +RTS -h depends on profiling
    
    The rts option `-h` behaves as `-hT` when compiled without profiling,
    and `-hc` when compiled with profiling. Add a note to the user's guide
    highlighting this inconsistency.


>---------------------------------------------------------------

6acb36d8ea169dfc0ddc4e10559a9bf6b4316212
 docs/users_guide/profiling.rst       | 5 +++++
 docs/users_guide/runtime_control.rst | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst
index def3596..c1379f3 100644
--- a/docs/users_guide/profiling.rst
+++ b/docs/users_guide/profiling.rst
@@ -697,6 +697,11 @@ following RTS options select which break-down to use:
     *Requires :ghc-flag:`-prof`.* Breaks down the graph by the cost-centre stack
     which produced the data.
 
+    .. note:: The meaning of the shortened :rts-flag:`-h` is dependent on whether
+              your program was compiled for profiling. When compiled for profiling,
+              :rts-flag:`-h` is equivalent to :rts-flag:`-hc`, but otherwise is
+              equivalent to :rts-flag:`-hT` (see :ref:`rts-profiling`).
+
 .. rts-flag:: -hm
 
     *Requires :ghc-flag:`-prof`.* Break down the live heap by the module
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst
index 7526b06..a5c2f14 100644
--- a/docs/users_guide/runtime_control.rst
+++ b/docs/users_guide/runtime_control.rst
@@ -984,6 +984,10 @@ executables:
     ``THUNK``). To get a more detailed profile, use the full profiling support
     (:ref:`profiling`). Can be shortened to :rts-flag:`-h`.
 
+    .. note:: The meaning of the shortened :rts-flag:`-h` is dependent on whether
+              your program was compiled for profiling.
+              (See :ref:`rts-options-heap-prof` for details.)
+
 .. rts-flag:: -L ⟨n⟩
 
     :default: 25 characters



More information about the ghc-commits mailing list