diff options
Diffstat (limited to '080_blog/00040_Haskell/00020_GHC-Notes')
| -rw-r--r-- | 080_blog/00040_Haskell/00020_GHC-Notes/index.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/080_blog/00040_Haskell/00020_GHC-Notes/index.md b/080_blog/00040_Haskell/00020_GHC-Notes/index.md new file mode 100644 index 0000000..c945319 --- /dev/null +++ b/080_blog/00040_Haskell/00020_GHC-Notes/index.md @@ -0,0 +1,39 @@ +# The Glasgow Haskell Compiler + +## Some GHC Flags + + -v verbose mode + -O2 level 2 optimizations + -rtsopts allow +RTS flags + -prof enable basic time and allocation profiling + -auto-all cost centers on all top level functions + (you can also add them via the SCC pragma) + -caf-all generate data for CAFs (constant applicative forms) + -fforce-recomp force recompilation + -threaded Use threaed runtime + -eventlog enables +RTS -l flag + + -Wall + -Werror + + Notes: you will obtain the profiling versions of dependancies via: + stack install --profile [libraryname] + + -fprof-auto replaced -auto-all + -fprof-cafs replaced -caf-all + +## Some +RTS flags + + -K set stack limit + -s statistic reporting + -p profiling + -hc extract heap profile + -hy allocation by type + -hd allocation by constructor + -ix x is sampling frequency in seconds. e.g. 0.01) + -Nx x is number of cores to utilize + -l emit log file (can be used threadscope) + -ddump-simpl generate core + + Note: render the heap profile as graph with: hp2ps -e8in -c file.hp + show eventlog with: threadscope file.eventlog |
