X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fprofiling.xml;h=3c75ad0fd2473be7dee6f2a471e6775be74be7f9;hb=8d5f03a9c7024090a9a753800cf7a219c6640d0c;hp=bae780d39ed0f7446710eaa7da175447043f861c;hpb=b9de29ac3fbf5192049a0bcaf1ab0c8bbbd57a83;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/profiling.xml b/ghc/docs/users_guide/profiling.xml index bae780d..3c75ad0 100644 --- a/ghc/docs/users_guide/profiling.xml +++ b/ghc/docs/users_guide/profiling.xml @@ -258,7 +258,7 @@ MAIN MAIN 0 0.0 0.0 100.0 100.0 {-# SCC "name" #-} <expression> - where "name" is an aribrary string, + where "name" is an arbitrary string, that will become the name of your cost centre as it appears in the profiling output, and <expression> is any Haskell @@ -345,8 +345,10 @@ x = nfib 25 - : - + + : + + To make use of the profiling system all modules must be compiled and linked @@ -369,9 +371,11 @@ x = nfib 25 - : - - cost centresautomatically inserting + + : + + cost centresautomatically inserting + GHC will automatically add _scc_ constructs for all @@ -380,8 +384,10 @@ x = nfib 25 - : - + + : + + All top-level functions, exported or not, will be automatically @@ -390,8 +396,10 @@ x = nfib 25 - : - + + : + + The costs of all CAFs in a module are usually attributed to one “big” CAF cost-centre. With @@ -401,8 +409,10 @@ x = nfib 25 - : - + + : + + Ignore any _scc_ constructs, so a module which already has @@ -425,10 +435,12 @@ x = nfib 25 - or : - - - time profile + + or : + + + time profile + The option produces a standard time profile report. It is written @@ -442,8 +454,10 @@ x = nfib 25 - : - + + : + + The option generates profiling information in the XML format understood by our new @@ -452,9 +466,10 @@ x = nfib 25 - - RTS - option + + + RTS option + This option makes use of the extra information maintained by the cost-centre-stack profiler to provide @@ -475,7 +490,7 @@ x = nfib 25 over time. This is useful for detecting the causes of space leaks, when your program holds on to more memory at run-time that it needs to. Space leaks lead to - longer run-times due to heavy garbage collector ativity, and may + longer run-times due to heavy garbage collector activity, and may even cause the program to run out of memory altogether. To generate a heap profile from your program: @@ -516,9 +531,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Breaks down the graph by the cost-centre stack which produced the data. @@ -526,9 +542,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Break down the live heap by the module containing the code which produced the data. @@ -536,9 +553,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Breaks down the graph by closure description. For actual data, the description @@ -548,9 +566,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Breaks down the graph by type. For closures which have @@ -560,9 +579,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Break down the graph by retainer set. Retainer profiling is described in more @@ -571,9 +591,10 @@ x = nfib 25 - - RTS - option + + + RTS option + Break down the graph by biography. Biographical profiling @@ -591,9 +612,10 @@ x = nfib 25 - name,... - RTS - option + + name,... + RTS option + Restrict the profile to closures produced by cost-centre stacks with one of the specified cost centres @@ -602,9 +624,10 @@ x = nfib 25 - name,... - RTS - option + + name,... + RTS option + Restrict the profile to closures produced by cost-centre stacks with one of the specified cost centres @@ -613,9 +636,10 @@ x = nfib 25 - module,... - RTS - option + + module,... + RTS option + Restrict the profile to closures produced by the specified modules. @@ -623,9 +647,10 @@ x = nfib 25 - desc,... - RTS - option + + desc,... + RTS option + Restrict the profile to closures with the specified description strings. @@ -633,9 +658,10 @@ x = nfib 25 - type,... - RTS - option + + type,... + RTS option + Restrict the profile to closures with the specified types. @@ -643,9 +669,10 @@ x = nfib 25 - cc,... - RTS - option + + cc,... + RTS option + Restrict the profile to closures with retainer sets containing cost-centre stacks with one of the specified @@ -654,9 +681,10 @@ x = nfib 25 - bio,... - RTS - option + + bio,... + RTS option + Restrict the profile to closures with one of the specified biographies, where @@ -687,8 +715,10 @@ x = nfib 25 - : - + + : + + Set the profiling (sampling) interval to secs seconds (the default is @@ -700,9 +730,10 @@ x = nfib 25 - - RTS option - + + + RTS option + Include the memory occupied by threads in a heap profile. Each thread takes up a small area for its thread @@ -778,7 +809,7 @@ x = nfib 25 The definition of retainers is designed to reflect a common cause of space leaks: a large structure is retained by an unevaluated computation, and will be released once the - compuation is forced. A good example is looking up a value in + computation is forced. A good example is looking up a value in a finite map, where unless the lookup is forced in a timely manner the unevaluated lookup will cause the whole mapping to be retained. These kind of space leaks can often be