From 837c6e35e3c52df84a82709cd6f91a8a7468fb51 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 5 Nov 2009 10:15:03 +0000 Subject: [PATCH] Update docs on ticky-ticky profiling --- docs/users_guide/flags.xml | 2 +- docs/users_guide/profiling.xml | 57 +++++++++++++++++++++++++--------- docs/users_guide/runtime_control.xml | 21 +++++-------- 3 files changed, 50 insertions(+), 30 deletions(-) diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 75d240c..cd6b5b3 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -1556,7 +1556,7 @@ phase n - Turn on ticky-ticky profiling + Turn on ticky-ticky profiling static - 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 diff --git a/docs/users_guide/runtime_control.xml b/docs/users_guide/runtime_control.xml index 2b16234..c482a28 100644 --- a/docs/users_guide/runtime_control.xml +++ b/docs/users_guide/runtime_control.xml @@ -973,20 +973,13 @@ Produce “ticky-ticky” statistics at the - end of the program run. The file - business works just like on the RTS - option (above). - - “Ticky-ticky” statistics are counts of - various program actions (updates, enters, etc.) The program - must have been compiled using - - (a.k.a. “ticky-ticky profiling”), and, for it to - be really useful, linked with suitable system libraries. - Not a trivial undertaking: consult the installation guide on - how to set things up for easy “ticky-ticky” - profiling. For more information, see . + end of the program run (only available if the program was + linked with ). + The file business works just like + on the RTS option, above. + + For more information on ticky-ticky profiling, see + . -- 1.7.10.4