• Simon Marlow's avatar
    More changes aimed at improving call stacks. · 1469f1eb
    Simon Marlow authored
      - 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)
    1469f1eb
SCCfinal.lhs 8.71 KB