summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-03-23 16:11:45 +0100
committerBen Gamari <ben@smart-cactus.org>2016-03-24 10:53:27 +0100
commit8048d51be0676627b417c128af0b0c352b75c537 (patch)
tree0d4ae8449cf93b94078587e6793e13dcd4a5ac76 /docs
parentda3b29bd1768d717753b7d1642e0e4e97750ae7b (diff)
downloadhaskell-8048d51be0676627b417c128af0b0c352b75c537.tar.gz
ErrUtils: Add timings to compiler phases
This adds timings and allocation figures to the compiler's output when run with `-v2` in an effort to ease performance analysis. Todo: * Documentation * Where else should we add these? * Perhaps we should remove some of the now-arguably-redundant `showPass` occurrences where they are * Must we force more? * Perhaps we should place this behind a `-ftimings` instead of `-v2` Test Plan: `ghc -v2 Test.hs`, look at the output Reviewers: hvr, goldfire, simonmar, austin Reviewed By: simonmar Subscribers: angerman, michalt, niteria, ezyang, thomie Differential Revision: https://phabricator.haskell.org/D1959
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/debugging.rst10
-rw-r--r--docs/users_guide/using.rst4
2 files changed, 11 insertions, 3 deletions
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index f3d2009ad1..a865f0afb2 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -201,7 +201,15 @@ Dumping out compiler intermediate structures
.. ghc-flag:: -dshow-passes
- Print out each pass name as it happens.
+ Print out each pass name, its runtime and heap allocations as it happens.
+ Note that this may come at a slight performance cost as the compiler will
+ be a bit more eager in forcing pass results to more accurately account for
+ their costs.
+
+ Two types of messages are produced: Those beginning with ``***`` are
+ denote the beginning of a compilation phase whereas those starting with
+ ``!!!`` mark the end of a pass and are accompanied by allocation and
+ runtime statistics.
.. ghc-flag:: -ddump-core-stats
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index ba0e223847..bcd641fb28 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -593,11 +593,11 @@ See also the ``--help``, ``--version``, ``--numeric-version``, and
``-v1``
Minimal verbosity: print one line per compilation (this is the
- default when ``--make`` or ``--interactive`` is on).
+ default when :ghc-flag:`--make` or :ghc-flag:`--interactive` is on).
``-v2``
Print the name of each compilation phase as it is executed.
- (equivalent to ``-dshow-passes``).
+ (equivalent to :ghc-flag:`-dshow-passes`).
``-v3``
The same as ``-v2``, except that in addition the full command