Profiling semantics

Roman Cheplyaka roma at
Tue Jan 17 10:30:36 CET 2012

* Simon Marlow <marlowsd at> [2012-01-03 11:00:58+0000]
> I'd be interested in hearing feedback, particularly if you find a
> case where costs are attributed somewhere that you didn't expect, or
> the stack looks wrong.

What I often find counter-intuitive is how the 'entries' count is

Sometimes I see 0 entries for some SCC while its children have non-zero
entries counts. I guess this has to do with inlining? Still, I don't see
why it should be so -- if it's possible to compute metrics like time and
allocations for such an SCC, why shouldn't it be possible to compute

Another case is when a function has a large number of entries, although
in reality it's entered only once (I can confirm that using trace, for
example). My guess would be that its SCC got inherited by some recursive
function, but again, this is very confusing.

And because of things like that, I don't usually trust the entries
counts even when they look realistic.

I observe this with GHC 7.0.3. Do you think this was improved in GHC

(Unfortunately, it's going to be hard to make a minimal test case, and
it's also not trivial to simply test with a newer GHC. But if you
say there's a chance, I'll put effort into that.)

Roman I. Cheplyaka ::

More information about the Glasgow-haskell-users mailing list