Is there a message profiler in Squeak?

Bert Freudenberg bert at freudenbergs.de
Wed Oct 3 20:14:09 UTC 2007


#tallySends: simulates the code rather than running it. It will trip  
over the same things that can't be simulated as the debugger's "step"  
button. I guess code using semaphore like the network code won't work.

- Bert -

On Oct 3, 2007, at 20:15 , Robert Withers wrote:

> This is reproducible and not limited to the vm I specified.  I also  
> ran this with vm: 'Squeak 3.8.12beta4U.app' and it crashed.  Also,  
> it crashes almost immediately, unlike what I said earlier.  Also,  
> there are several problems.  The crash is described below.  I am  
> also getting code simulation errors using MessageTally tallySends:  
> [...].   I think this sets up the crash.
>
> I dug into the code and this is what I found.  This code crashes  
> the vm:
>
> 	Socket new connectTo: 1 port: 80.
>
> I call #connectTo:port: with an argument of 1 due to interference  
> by the MessageTally.  When I run the code below I crash:
>
> 	| addr s |
> 	Socket initializeNetwork.
> 	MessageTally tallySends: [
> 		addr := NetNameResolver addressForName: 'www.google.org'.
> 		(s := SafeSocket new) connectTo: addr port: 80.
> 		s waitForConnectionFor: Socket standardTimeout ifTimedOut: [].
> 	].
>
> and when I run this code the result is 1.
> 	| addr s |
> 	Socket initializeNetwork.
> 	MessageTally tallySends: [
> 		addr := NetNameResolver addressForName: 'www.google.org'.
> 	].
> 	addr
>
> I hope this helps,
> Rob
>
> On Oct 3, 2007, at 10:16 AM, Robert Withers wrote:
>
>> Sure.  I am running on a Mac with vm: 'Squeak 3.8.18beta1U.app'.    
>> I am running an image started from Squeak3.10alpha.7081.image or  
>> so.  I am not sure of the exact update number since I don't have  
>> that root image around anymore.  I have loaded everything  
>> specified for SSH (2 bug fixes, telnet, Crypto, SSL, SSH).  I then  
>> ran this code, with appropriate values inserted for user and host:
>>
>> MessageTally tallySends: [SSH runBy: user to: host port: 22].
>>
>> It ran for a bit then crashed.
>>
>> Rob
>>
>> On Oct 3, 2007, at 9:59 AM, Travis Kay wrote:
>>
>>> Can you share what you executed that crashed your image?
>>> Which image and vm versions?
>>>
>>> Travis
>>>
>>> Robert Withers wrote:
>>>> As promising as this was, it killed my image.  I don't know  
>>>> why.  Luckily, all changes are saved!  I love Smalltalk!
>>>>
>>>> Rob
>>>>
>>>> On Oct 3, 2007, at 3:02 AM, Bert Freudenberg wrote:
>>>>
>>>>> On Oct 3, 2007, at 3:19 , Lukas Renggli wrote:
>>>>>
>>>>>>> I am looking for a class that displays the call tree of an  
>>>>>>> executed
>>>>>>> block of code.
>>>>>>
>>>>>>     MessageTally spyOn: [ 1000 factorial ]
>>>>>
>>>>> That is only a sampling time profiler. A call tree you get by  
>>>>> doing
>>>>>
>>>>>     MessageTally tallySends: [42.0 printString]
>>>>>
>>>>> - Bert -







More information about the Squeak-dev mailing list