summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaximilian Tagher <feedback.tagher@gmail.com>2020-02-01 14:27:10 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-17 07:36:48 -0400
commit89f034ddeb4ad7d93c877d5bdbcf2cca7a44f79c (patch)
tree93a7c664e20cea52ac3f4b2fcf6adfb3bdb18821
parente1aa40525ddac370766907a49682976e2ea78422 (diff)
downloadhaskell-89f034ddeb4ad7d93c877d5bdbcf2cca7a44f79c.tar.gz
Document the units of -ddump-timings
Right now, in the output of -ddump-timings to a file, you can't tell what the units are: ``` CodeGen [TemplateTestImports]: alloc=22454880 time=14.597 ``` I believe bytes/milliseconds are the correct units, but confirmation would be appreciated. I'm basing it off of this snippet from `withTiming'`: ``` when (verbosity dflags >= 2 && prtimings == PrintTimings) $ liftIO $ logInfo dflags (defaultUserStyle dflags) (text "!!!" <+> what <> colon <+> text "finished in" <+> doublePrec 2 time <+> text "milliseconds" <> comma <+> text "allocated" <+> doublePrec 3 (realToFrac alloc / 1024 / 1024) <+> text "megabytes") ``` which implies time is in milliseconds, and allocations in bytes (which divided by 1024 would be KB, and again would be MB)
-rw-r--r--docs/users_guide/debugging.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index 82d10e6e99..61a06b2e38 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -87,6 +87,7 @@ Dumping out compiler intermediate structures
:type: dynamic
Show allocation and runtime statistics for various stages of compilation.
+ Allocations are measured in bytes. Timings are measured in milliseconds.
GHC is a large program consisting of a number of stages. You can tell GHC to
dump information from various stages of compilation using the ``-ddump-⟨pass⟩``