X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fusers_guide%2Fprofiling.xml;h=adb7a336921ddd1bccec7c4737ebbc14a5f16095;hb=97a8fe8780307e95829034117efa98d2e27109cd;hp=1b4dfa03da797aa5e959d39096dfe95b65bf694d;hpb=5263c9ab4408e3b62dbf7505ab40a81946d4e49b;p=ghc-hetmet.git diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml index 1b4dfa0..adb7a33 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: + + +