Profiling trouble

Simon Marlow simonmar@microsoft.com
Mon, 27 Jan 2003 15:58:59 -0000


> With 5.04 I get almost the same, look:
>=20
> COST CENTRE                    MODULE               %time %alloc
>=20
> showData1                      Main                  87.1   89.2
> ncEps                          Epsilon                3.6    3.4
> cutAbove4                      Tcsa                   2.6    1.2
>=20
>                                                    =20
> individual    inherited
> COST CENTRE              MODULE    no.    entries  %time=20
> %alloc   %time %alloc
>=20
> MAIN                     MAIN        1           0   0.0   =20
> 0.0   100.0  100.0
>  main                    Main      165           0   0.1   =20
> 0.0   100.0  100.0
>   [...]
>   showData               Main      173           1   0.0   =20
> 0.0    91.5   92.1
>    showData2             Main      178           0   0.0   =20
> 0.0     0.0    0.0
>    showData3             Main      177           0   0.0   =20
> 0.0     0.0    0.0
>    showData4             Main      176           0   0.1   =20
> 0.1     0.1    0.1
>    showData5             Main      175           0   0.0   =20
> 0.0     0.3    0.3
>     myShow               Main      200        9453   0.3   =20
> 0.3     0.3    0.3
>    showData1             Main      174           0  87.1  =20
> 89.2    91.1   91.7
>     cutAbove             Tcsa      181           0   0.0   =20
> 0.0     2.6    1.2
>      cutAbove2           Tcsa      199           1   0.0   =20
> 0.0     0.0    0.0
>      cutAbove3           Tcsa      193          27   0.0   =20
> 0.0     0.0    0.0
>      cutAbove4           Tcsa      182           0   2.6   =20
> 1.2     2.6    1.2
>     spinSelect           Tcsa      180           1   0.0   =20
> 0.0     0.0    0.0
>     getStates            Tcsa      179           1   0.9   =20
> 1.0     1.4    1.2
>      incrementalBase     Fermion   189           1   0.4   =20
> 0.2     0.5    0.2
>       fermionNumber      Fermion   192       77664   0.1   =20
> 0.0     0.1    0.0
>      mergeUp             Boson     184           6   0.0   =20
> 0.0     0.0    0.0
>      allTowers           Boson     183           0   0.0   =20
> 0.0     0.0    0.0
>       inModule           Boson     185          17   0.0   =20
> 0.0     0.0    0.0
>   [...]

It looks from the profile that the showData1 cost centre has widened in
scope to encompass some extra code.  This may be because of incorrect
transformations made by the compiler (transformations in the presence of
cost-centre annotations have to be done very carefully, and I'm sure the
compiler currently has bugs in this area).

If you could send us a smaller example that displays the problem, we'll
be happy to look into it.

Cheers,
	Simon