parallel cost-centre profiling

Simon Marlow marlowsd at gmail.com
Tue Jun 15 04:36:14 EDT 2010


On 14/06/2010 08:39, Henrique Ferreiro wrote:
> Sorry for the late replay, I thought I made it work but I am still
> fighting with it.
>
>> Do you really need to do this?  Why not share the stacks and use a mutex to
>> protect the operations?
>
> My idea is to allow for profiling of each capability, so I need to
> keep the stacks independent of each other. Otherwise, we would get the
> same output as if it had been run sequentially.

I'm not sure it's useful to profile each Capability separately.  Threads 
migrate between Capabilities under the control of the runtime system, so 
you won't get the same results from run to run.

Perhaps what you really wanted was per-thread profiling?  But that's 
much harder -you'd need per-thread stacks.  It would be a big change to 
the profiling system, and I'm not really sure whether the benefit is 
worth it.

Cheers,
	Simon



More information about the Cvs-ghc mailing list