[squeak-dev] Re: How to profile a server image?

Andreas Raab andreas.raab at gmx.de
Wed Mar 4 02:01:18 UTC 2009


Juan Vuletich wrote:
> I'm not interested at all on identifying the parent process. To make my 
> aim clearer, let's see an example:
> 
>    [1000 timesRepeat: [3.14159 printString. Processor yield]] fork.
>    [1000 timesRepeat: [30 factorial. Processor yield]] fork.
>    [1000 timesRepeat: [30 factorial. Processor yield]] fork.
>    MessageTally spyOn: [ (Delay forMilliseconds: 100) wait]
> 
> Without Andreas fixes, it gives a completely useless answer, as if all 
> the time was spent in the Delay.

Ah, very good! I've been looking for an example that illustrates just 
that. This is extremely helpful. For our purposes (lots of processes, 
you want to profile overall server behavior) the cumulative tree is the 
only useful response. There would be no point whatsoever even trying to 
separate hundreds of processes (it is statistical profiling after all).

However, I can see that in some situations your view might be useful for 
some people. I would guess that the easiest way to distinguish processes 
would be look at the identity of the context that is at the root of the 
call tree. If you send me the code I'll see if I can come up with a 
clever way to have our cake and eat it, too.

Cheers,
   - Andreas




More information about the Squeak-dev mailing list