Beginners profiling question

Dirk Evers dirk@TechFak.Uni-Bielefeld.DE
Mon, 11 Dec 2000 12:36:22 +0100 (MET)


On 11-Dec-00 Simon Marlow wrote:
>> So I have tried profiling the first time...
>>=20
>>   using ghc-4.08.1 with options -prof -auto-all
>>   runtime option -px
>>   ghcprof and daVinci work like a charm
>>=20
>> what I see is
>>=20
>>   main uses 99.90 % time and space
>>   sat for practical purposes is the only function called from main and
>>   uses ca. 12 % time and space
>>=20
>> what am I doing wrong...
>> Prelude not compiled for profiling?
>=20
> I'm not sure what you're expecting to see - the profile looks reasonable
> to me.  Why do you think it's wrong?
>=20
> Ah, perhaps you're worried that the percentages don't add up to 100%:
> that's because they're "inherited", i.e. sat's costs form part of the
> total costs of main, because main called sat.  The daVinci browser has a
> button to turn off inherited stats, as I recall.

Your picture shows that sat uses 12% of the time, and main uses 99% which i=
s
fine because it inherites all time usage. But main really only calls sat, l=
ike
so:

 main =3D do
           ~[rnastr] <- getArgs
           print (sat (str2inp rnastr (0::Int)))

str2inp is just a small data conversion routines for sat. So where
does all the time go?

> BTW, we're working on a new profile viewer.  Here is a screenshot
> showing your profile:
>=20
>       http://research.microsoft.com/~simonmar/pview.jpg
>=20
> the user interface is little rough at the moment, but you can see the
> general idea.

This looks nice!


>=20
> Cheers,
>       Simon
>=20
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


I will set up a complete example as Simon Peyton-Jones suggested.

Thanks again
Dirk

---
+---------------------------------------------------------------------+
| Dirk Evers                                           Office: M3-120 |
| Technische Fakultaet / AG PI                  Tel: +49 521 106-2905 |
| Universitaet Bielefeld                        FAX: +49 521 106-6411 |
| D-33594 Bielefeld             e-mail: dirk@TechFak.Uni-Bielefeld.DE |
| Germany             URL: http://www.TechFak.Uni-Bielefeld.DE/~dirk/ |
|---------------------------------------------------------------------|
| Die Succulenten   / a cappella singing /  http://www.succulenten.de |
+---------------------------------------------------------------------+