X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fprofiling.xml;fp=docs%2Fusers_guide%2Fprofiling.xml;h=0138e57d818d217e16b95f30fef6a9985841fa46;hb=837c6e35e3c52df84a82709cd6f91a8a7468fb51;hp=0410d9e32ee0792670b37e4dfdc972286914b171;hpb=ad9239172c453e4244de8eccc172e2c679766ea5;p=ghc-hetmet.git diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml index 0410d9e..0138e57 100644 --- a/docs/users_guide/profiling.xml +++ b/docs/users_guide/profiling.xml @@ -1596,13 +1596,13 @@ Options: (ToDo: document properly.) - It is possible to compile Glasgow Haskell programs so that + It is possible to compile Haskell programs so that they will count lots and lots of interesting things, e.g., number of updates, number of data constructors entered, etc., etc. We call this “ticky-ticky” profiling,ticky-ticky profiling profiling, - ticky-ticky because that's the sound a Sun4 + ticky-ticky because that's the sound a CPU makes when it is running up all those counters (slowly). @@ -1610,25 +1610,52 @@ Options: it is quite separate from the main “cost-centre” profiling system, intended for all users everywhere. - To be able to use ticky-ticky profiling, you will need to - have built the ticky RTS. (This should be described in - the building guide, but amounts to building the RTS with way - "t" enabled.) + + You don't need to build GHC, the libraries, or the RTS a special + way in order to use ticky-ticky profiling. You can decide on a + module-by-module basis which parts of a program have the + counters compiled in, using the + compile-time option. Those modules that + were not compiled with won't contribute + to the ticky-ticky profiling results, and that will normally + include all the pre-compiled packages that your program links + with. + - To get your compiled program to spit out the ticky-ticky - numbers, use a RTS - option-r RTS option. - See . + + To get your compiled program to spit out the ticky-ticky + numbers: - Compiling your program with the - switch yields an executable that performs these counts. Here is a - sample ticky-ticky statistics file, generated by the invocation - foo +RTS -rfoo.ticky. + + + + Link the program with + ( is a synonym + for at link-time). This links in + the debug version of the RTS, which includes the code for + aggregating and reporting the results of ticky-ticky + profilng. + + + + + Run the program with the RTS + option-r RTS option. + See . + + + + + + Here is a sample ticky-ticky statistics file, generated by + the invocation + foo +RTS -rfoo.ticky. + + foo +RTS -rfoo.ticky - ALLOCATIONS: 3964631 (11330900 words total: 3999476 admin, 6098829 goods, 1232595 slop) total words: 2 3 4 5 6+ 69647 ( 1.8%) function values 50.0 50.0 0.0 0.0 0.0