Fix warnings
[ghc-hetmet.git] / docs / users_guide / profiling.xml
index 51ae6f7..0410d9e 100644 (file)
@@ -266,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").</para>
 
+      <para>Here is an example of a program with a couple of SCCs:</para>
+
+<programlisting>
+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
+</programlisting>
+
+      <para>which gives this heap profile when run:</para>
+
+      <imagedata fileref="prof_scc"/>
+
     </sect2>
 
     <sect2 id="prof-rules">
@@ -509,6 +525,11 @@ x = nfib 25
       </listitem>
     </orderedlist>
 
+    <para>You might also want to take a look
+      at <ulink url="http://www.haskell.org/haskellwiki/Hp2any">hp2any</ulink>,
+      a more advanced suite of tools (not distributed with GHC) for
+      displaying heap profiles.</para>
+
     <sect2 id="rts-options-heap-prof">
       <title>RTS options for heap profiling</title>