profiling,-O in 6.12.1
Serge D. Mechveliani
mechvel at botik.ru
Thu Feb 4 10:50:53 EST 2010
To my
> >>>It looks like ghc-6.12.1 reports erroneous time profiling --
> >>>when the Main module of the project is made under -O.
> >>>[..]
> >>>This is for ghc-6.12.1 made from source for Debian Linux and
> >>>i386-like.
> >>> []
> >The key combination
> > ghc $dmCpOpt -prof --make Main
> >shows 95% for eLoop,
> >and adding -O to this line shows 0% for eLoop, independently on
> >presence of -auto-all in this line
> >(the whole library is made under -O -prof).
>
>
> >Yes, I recall that the effect may be of inlining.
Simon Marlow wrote on Thu, Feb 04, 2010
> Inlining should not in general affect the shape of the profile. I can't
> say much else here without seeing the specific code.
Finally, by setting -O0 -prof I have found "who of top-levels takes
most of time" -- hopefully, the same functions will occur for -O.
I do not know, maybe, this is a known bug (Simon writes, there exists
some report).
Anyway, it is important to debug profiling -- to making unnecessary any
irregular tricks with -inline-not.
Dear GHC team,
if I put my project to a public place, would you find out what is the
effect there about -O -prof ?
Although the whole program is large, but probably, the very example with
`main' + Complete.complete + a single SCC, is simple for you to detect
the effect source.
Regards,
-----------------
Serge Mechveliani
mechvel at botik.ru
More information about the Glasgow-haskell-bugs
mailing list