X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fprofiling.xml;h=f0d96ba98b952acf5148d8475972f5e4e45b5823;hb=aedb94f5f220b5e442b23ecc445fd38c8d9b6ba0;hp=9a1f2894834881cb612b5cfe2e4383f5b055ab43;hpb=7895455f8dc327c6b447f9287d6e76ddcd253183;p=ghc-hetmet.git diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml index 9a1f289..f0d96ba 100644 --- a/docs/users_guide/profiling.xml +++ b/docs/users_guide/profiling.xml @@ -33,7 +33,9 @@ Run your program with one of the profiling options, eg. +RTS -p -RTS. This generates a file of - profiling information. + profiling information. Note that multi-processor execution + (e.g. +RTS -N2) is not supported while + profiling. RTS option @@ -264,6 +266,22 @@ MAIN MAIN 0 0.0 0.0 100.0 100.0 far to the right as possible when parsing. (SCC stands for "Set Cost Centre"). + Here is an example of a program with a couple of SCCs: + + +main :: IO () +main = do let xs = {-# SCC "X" #-} [1..1000000] + let ys = {-# SCC "Y" #-} [1..2000000] + print $ last xs + print $ last $ init xs + print $ last ys + print $ last $ init ys + + + which gives this heap profile when run: + + + @@ -1256,7 +1274,7 @@ to re-read its input file: hpc - Code coverage tools allow a programer to determine what parts of + Code coverage tools allow a programmer to determine what parts of their code have been actually executed, and which parts have never actually been invoked. GHC has an option for generating instrumented code that records code coverage as part of the