diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-12-02 13:09:14 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-12-02 15:11:33 +0000 |
commit | 1469f1eb7817fbc46b17e994498450a9a6b12ea7 (patch) | |
tree | 698f0eadb98ed4276f2faf183492e9bfc2276b6b /rts/Profiling.c | |
parent | 6f4bde149e46146125d688d9ff719c2e5e0800c2 (diff) | |
download | haskell-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 'rts/Profiling.c')
-rw-r--r-- | rts/Profiling.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rts/Profiling.c b/rts/Profiling.c index 7fb7f9e3cf..ed374b562f 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -87,13 +87,13 @@ Mutex ccs_mutex; * traverse pinned memory. */ -CC_DECLARE(CC_MAIN, "MAIN", "MAIN", CC_NOT_CAF, ); -CC_DECLARE(CC_SYSTEM, "SYSTEM", "SYSTEM", CC_NOT_CAF, ); -CC_DECLARE(CC_GC, "GC", "GC", CC_NOT_CAF, ); -CC_DECLARE(CC_OVERHEAD, "OVERHEAD_of", "PROFILING", CC_NOT_CAF, ); -CC_DECLARE(CC_DONT_CARE, "DONT_CARE", "MAIN", CC_NOT_CAF, ); -CC_DECLARE(CC_PINNED, "PINNED", "SYSTEM", CC_NOT_CAF, ); -CC_DECLARE(CC_IDLE, "IDLE", "IDLE", CC_NOT_CAF, ); +CC_DECLARE(CC_MAIN, "MAIN", "MAIN", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_SYSTEM, "SYSTEM", "SYSTEM", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_GC, "GC", "GC", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_OVERHEAD, "OVERHEAD_of", "PROFILING", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_DONT_CARE, "DONT_CARE", "MAIN", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_PINNED, "PINNED", "SYSTEM", "<built-in>", CC_NOT_CAF, ); +CC_DECLARE(CC_IDLE, "IDLE", "IDLE", "<built-in>", CC_NOT_CAF, ); CCS_DECLARE(CCS_MAIN, CC_MAIN, ); CCS_DECLARE(CCS_SYSTEM, CC_SYSTEM, ); |