Cheatography
https://cheatography.com
http://haskell.org/haskellwiki/GHC
Profiling
profiling |
-prof |
show runtime-system statistics |
+RTS -T |
save runtime-system statistics to file |
+RTS -tfile |
all bindings not marked INLINE |
-fprof-auto |
all top-level bindings not marked INLINE |
-fprof-auto-top |
all exported bindings nto marked INLINE |
-fprof-auto-exported |
all call sites |
-fprof-auto-calls |
Flow of Heap Profiling
compiling with |
-prof -fprof-auto -rtsopts |
running with |
+RTS -h |
visualizing with |
hp2ps *.hp |
colored OUTPUT |
hp2ps -c *.hp |
- category setting
break by cost-center |
-hc |
break by module |
-hm |
break by constructor/closure |
-hd |
break by type |
-hy |
- hp2ps options
place rough bands on top |
-d |
big box for title |
-b |
EPS for latex |
-e |
for preview |
-g |
limit to n bands |
-mn |
use the previous parameters |
-p |
color output |
-c |
ignore marks |
-y |
print help |
-? |
|
|
Flow of Time Profiling
compiling with |
-prof -fprof-auto -rtsopts |
running with |
+RTS -p |
OUTPUT |
*.prof |
Flow of Stack Trace
compiling with |
-prof -fprof-auto -rtsopts |
running with |
+RTC -xc |
Flow of Code Coverage
compiling with |
-fhpc |
running |
no options need |
reporting |
hpc report tix file |
making html files |
hpc markup tix file |
Coverage data is stored in *.tix file.
- hpc options
display help |
hpc help |
report coverage |
hpc report |
make html files |
hpc markup |
sum multiple coverages |
hpc sum |
combine two coverages |
hpc combine |
show in verbose mode |
hpc show |
display version |
hpc version |
Optimization
optimization level |
-On (n =1,2,3,4) |
no optimization |
-O0 |
make constructor fields strict |
-funbox-strict-fields |
static argument transformation |
-fstatic-argument-transformation |
for IO/ST monad |
-fno-state-hack |
|
|
RTS options for GC
allocation area size |
-Asize (default: 512KB) |
suggested heap size |
-Hsize (default: 0KB) |
maximum heap size |
-Msize (default: unlimited) |
Backends
Native Code Generator |
-fasm |
LLVM |
-fllvm |
SMP Parallelism
use thread |
-threaded |
avoid repeated computation of thunks |
-feager-blackholing |
avoid waiting |
-fno-strictness |
use n threads |
+RTS -Nn |
use all processors |
+RTS -N |
pin threads |
+RTS -qa |
enable auto thread migration |
+RTS -qm |
- debug parallelism
make eventlog of parallel sparks (sampled) |
-lp (default) |
make eventlog of parallel sparks (fully accurate) |
-lf |
eventlog is stored as *.eventlog
|
Created By
Metadata
Comments
nash, 07:40 21 Nov 12
http://haskell.org/haskellwiki/GHC
Add a Comment
Related Cheat Sheets