Skip to content
  • Ömer Sinan Ağacan's avatar
    Show sources of cost centers in .prof · d7933cbc
    Ömer Sinan Ağacan authored
    This fixes the problem with duplicate cost-centre names that was
    reported a couple of times before. When a module implements a typeclass
    multiple times for different types, methods of different implementations
    get same cost-centre names and are reported like this:
    
        COST CENTRE MODULE            %time %alloc
    
        CAF         GHC.IO.Handle.FD    0.0   32.8
        CAF         GHC.Read            0.0    1.0
        CAF         GHC.IO.Encoding     0.0    1.8
        showsPrec   Main                0.0    1.2
        readPrec    Main                0.0   19.4
        readPrec    Main                0.0   20.5
        main        Main                0.0   20.2
    
                                                individual      inherited
        COST CENTRE  MODULE  no.     entries  %time %alloc   %time %alloc
    
        MAIN         MAIN     53          0    0.0    0.2     0.0  100.0
         CAF         Main    105          0    0.0    0.3     0.0   62.5
          readPrec   Main    109          1    0.0    0.6     0...
    d7933cbc