Measuring performance of GHC
Johannes Waldmann
johannes.waldmann at htwk-leipzig.de
Wed Dec 7 10:34:42 UTC 2016
Hi Ben, thanks,
> 4. run the build, `cabal configure --ghc-options="-p -hc" $args && cabal build`
cabal configure $args --ghc-options="+RTS -p -hc -RTS"
> You should end up with a .prof and .hp file.
Yes, that works. - Typical output starts like this
COST CENTRE MODULE %time %alloc
SimplTopBinds SimplCore 60.7 57.3
OccAnal SimplCore 6.0 6.0
Simplify SimplCore 3.0 0.5
These files are always called ghc.{prof,hp},
how could this be changed? Ideally, the output file name
would depend on the package being compiled,
then the mechanism could probably be used with 'stack' builds.
Building executables mentioned in the cabal file will
already overwrite profiling info from building libraries.
When I 'cabal build' the 'text' package,
then the last actual compilation (which leaves
the profiling info) is for cbits/cbits.c
I don't see how to build Data/Text.hs alone
(with ghc, not via cabal), I am getting
Failed to load interface for ‘Data.Text.Show’
- J.
More information about the ghc-devs
mailing list