summaryrefslogtreecommitdiff
path: root/docs/users_guide/profiling.xml
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-02 13:09:14 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-02 15:11:33 +0000
commit1469f1eb7817fbc46b17e994498450a9a6b12ea7 (patch)
tree698f0eadb98ed4276f2faf183492e9bfc2276b6b /docs/users_guide/profiling.xml
parent6f4bde149e46146125d688d9ff719c2e5e0800c2 (diff)
downloadhaskell-1469f1eb7817fbc46b17e994498450a9a6b12ea7.tar.gz
More changes aimed at improving call stacks.
- Attach a SrcSpan to every CostCentre. This had the side effect that CostCentres that used to be merged because they had the same name are now considered distinct; so I had to add a Unique to CostCentre to give them distinct object-code symbols. - New flag: -fprof-auto-calls. This flag adds an automatic SCC to every call site (application, to be precise). This is typically more useful for call stacks than annotating whole functions. Various tidy-ups at the same time: removed unused NoCostCentre constructor, and refactored a bit in Coverage.lhs. The call stack we get from traceStack now looks like this: Stack trace: Main.CAF (<entire-module>) Main.main.xs (callstack002.hs:18:12-24) Main.map (callstack002.hs:13:12-16) Main.map.go (callstack002.hs:15:21-34) Main.map.go (callstack002.hs:15:21-23) Main.f (callstack002.hs:10:7-43)
Diffstat (limited to 'docs/users_guide/profiling.xml')
-rw-r--r--docs/users_guide/profiling.xml18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml
index ee3b387e31..25db08045a 100644
--- a/docs/users_guide/profiling.xml
+++ b/docs/users_guide/profiling.xml
@@ -437,6 +437,24 @@ MAIN MAIN 102 0 0.0 0.0 100.0 1
<varlistentry>
<term>
+ <option>-fprof-auto-calls</option>:
+ <indexterm><primary><option>-fprof-auto-calls</option></primary></indexterm>
+ </term>
+ <listitem>
+ <para>Adds an automatic <literal>SCC</literal> annotation to
+ all <emphasis>call sites</emphasis>. This is particularly
+ useful when using profiling for the purposes of generating
+ stack traces; see the
+ function <literal>traceStack</literal> in the
+ module <literal>Debug.Trace</literal>, or
+ the <literal>-xc</literal> RTS flag
+ (<xref linkend="rts-options-debugging" />) for more
+ details.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<option>-fprof-cafs</option>:
<indexterm><primary><option>-fprof-cafs</option></primary></indexterm>
</term>