Confused by profiling
Fri, 14 Sep 2001 17:18:14 +0100
On Fri, Sep 14, 2001 at 04:53:27PM +0100, Simon Marlow wrote:
> > p_aexp_list Parser 0 0.0 0.0
> > con2tag_Token# Tokens 880 0.0 0.0
> > pIfThing PC_base 896 0.0 0.0
> > Now basically my problem is how things under p_aexp_list can
> > be entered
> > 896 times if p_aexp_list is entered 0 times - am I reading it wrong?
> Hmmm. I suspect it may be to do with the fact that p_aexp_list isn't a
> function, it's a CAF (constant applicative form - basically a top-level
> expression). The "entries" field counts the number of times an SCC
> annotation is executed, which corresponds more to "calls" than entries.
> I must admit I haven't thought too hard about this.
> It might be helpful to see what happens to the code inside the compiler:
OK, I think I see why the output being generated is what it is. However,
it doesn't actually seem very useful to me.
> Perhaps the act of appending an SCC annotation when entering a function
> closure should bump the entry counts for all the cost centres in the
> stack. That might yield more reasonable-looking figures.
If that means what I think it might mean then I agree, but I don't get
the "in the stack" bit.