Profiling semantics

Simon Marlow marlowsd at
Tue Jan 17 10:44:22 CET 2012

On 17/01/2012 09:30, Roman Cheplyaka wrote:
> * 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
> computed.
> 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
> entries?
> 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
> 7.4.1?

This is improved a *lot* with 7.4.1.  In fact, we know for sure that it 
was completely broken before that.  Please try with 7.4.1 and let me 
know if you still find anything strange.


> (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.)

More information about the Glasgow-haskell-users mailing list