Commit 89f034dd authored by MaxGabriel's avatar MaxGabriel Committed by Marge Bot

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)
parent e1aa4052
Pipeline #16805 passed with stages
in 778 minutes and 30 seconds
......@@ -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⟩``
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment