Profiling Optimised Code

Simon Peyton-Jones simonpj@microsoft.com
Tue, 2 Sep 2003 16:56:05 +0100


Did anyone reply to this?  It's an open bug
=09
http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D710864&group=
_id
=3D8032&atid=3D108032
but we don't have a small example that demonstrates it. =20
Can you provide one?  Or can Amanda?

Simon

| -----Original Message-----
| From: glasgow-haskell-users-admin@haskell.org
[mailto:glasgow-haskell-users-admin@haskell.org]
| On Behalf Of Ashley Yakeley
| Sent: 03 August 2003 09:32
| To: glasgow-haskell-users@haskell.org
| Subject: Profiling Optimised Code
|=20
| The profiling report from my program compiled with GHC 6.0 with -O
| -fvia-C on Mac OS X isn't making a lot of sense. The line with the
most
| time, 30.1%, has an entry count of zero, as do most of them:
|=20
|             exprLetMap
| Org.Org.Semantic.HScheme.Interpret.LambdaExpression  1939           0
| 0.3    0.0    30.3    0.0
|              liftF2      Org.Org.Semantic.HBase.Category.Functor
| 1940           0   0.0    0.0    30.1    0.0
|               liftF1     Org.Org.Semantic.HBase.Category.Functor
| 1941           0  30.1    0.0    30.1    0.0
|=20
| It's also a fairly unlikely candidate for time consumption. liftF1 is
| defined as simply equal to fmap, which presumably doesn't have a
| cost-centre because it's defined in the standard libraries. But the
| instance of fmap that it calls is fairly trivial.
|=20
| Am I misinterpreting the report, or would I be better off profiling a
| unoptimised program to see where the slow bits are in that? I have
| successfully improved code based on reports from unoptimised programs
| from GHC 5.*, since those reports made much more sense.
|=20
| --
| Ashley Yakeley, Seattle WA
|=20
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users