[commit: ghc] master: More advice about profiling CAFs. (8aefdc0)

Edward Z. Yang ezyang at MIT.EDU
Mon Mar 11 21:12:34 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8aefdc085bea0e20f79d16c417507a36ba2d0f8f

>---------------------------------------------------------------

commit 8aefdc085bea0e20f79d16c417507a36ba2d0f8f
Author: Edward Z. Yang <ezyang at mit.edu>
Date:   Mon Mar 11 13:12:25 2013 -0700

    More advice about profiling CAFs.
    
    Signed-off-by: Edward Z. Yang <ezyang at mit.edu>

>---------------------------------------------------------------

 docs/users_guide/profiling.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml
index f213c54..3937642 100644
--- a/docs/users_guide/profiling.xml
+++ b/docs/users_guide/profiling.xml
@@ -357,7 +357,13 @@ MAIN            MAIN                    102           0    0.0    0.0   100.0  1
       cost centre <literal>M.CAF</literal>, where <literal>M</literal>
       is the name of the module.  It is also possible to give each CAF
       a different stack, using the option
-      <option>-fprof-cafs</option><indexterm><primary><option>-fprof-cafs</option></primary></indexterm>.</para>
+      <option>-fprof-cafs</option><indexterm><primary><option>-fprof-cafs</option></primary></indexterm>.
+      This is especially useful when compiling with
+      <option>-ffull-laziness</option> (as is default with
+      <option>-O</option> and higher), as constants in function bodies
+      will be lifted to the top-level and become CAFs.  You will probably
+      need to consult the Core (<option>-ddump-simpl</option>) in order
+      to determine what these CAFs correspond to.</para>
     </sect2>
   </sect1>
 





More information about the ghc-commits mailing list