<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">I know nothing about code simulation. I really need to run the InterpreterSimulator and learn, considering the vm changes I want to make for my research. I didn't know semaphores trip it up. Is there no way to repair that? This would explain the call to NetNameResolver>>#addressForName: returning garbage.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Rob</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Bert Freudenberg <bert@freudenbergs.de><BR>To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org><BR>Sent: Wednesday, October 3, 2007 1:14:09 PM<BR>Subject: Re: Is there a message profiler in Squeak?<BR><BR>
<DIV>#tallySends: simulates the code rather than running it. It will trip <BR>over the same things that can't be simulated as the debugger's "step" <BR>button. I guess code using semaphore like the network code won't work.<BR><BR>- Bert -<BR><BR>On Oct 3, 2007, at 20:15 , Robert Withers wrote:<BR><BR>> This is reproducible and not limited to the vm I specified. I also <BR>> ran this with vm: 'Squeak 3.8.12beta4U.app' and it crashed. Also, <BR>> it crashes almost immediately, unlike what I said earlier. Also, <BR>> there are several problems. The crash is described below. I am <BR>> also getting code simulation errors using MessageTally tallySends: <BR>> [...]. I think this sets up the crash.<BR>><BR>> I dug into the code and this is what I found. This code
crashes <BR>> the vm:<BR>><BR>> Socket new connectTo: 1 port: 80.<BR>><BR>> I call #connectTo:port: with an argument of 1 due to interference <BR>> by the MessageTally. When I run the code below I crash:<BR>><BR>> | addr s |<BR>> Socket initializeNetwork.<BR>> MessageTally tallySends: [<BR>> addr := NetNameResolver addressForName: '<A href="http://www.google.org/" target=_blank>www.google.org</A>'.<BR>> (s := SafeSocket new) connectTo: addr port: 80.<BR>> s waitForConnectionFor: Socket standardTimeout ifTimedOut: [].<BR>> ].<BR>><BR>> and when I run this code the result is 1.<BR>> | addr
s |<BR>> Socket initializeNetwork.<BR>> MessageTally tallySends: [<BR>> addr := NetNameResolver addressForName: '<A href="http://www.google.org/" target=_blank>www.google.org</A>'.<BR>> ].<BR>> addr<BR>><BR>> I hope this helps,<BR>> Rob<BR>><BR>> On Oct 3, 2007, at 10:16 AM, Robert Withers wrote:<BR>><BR>>> Sure. I am running on a Mac with vm: 'Squeak 3.8.18beta1U.app'. <BR>>> I am running an image started from Squeak3.10alpha.7081.image or <BR>>> so. I am not sure of the exact update number since I don't have <BR>>> that root image around anymore. I have loaded everything <BR>>> specified for SSH (2 bug fixes, telnet, Crypto, SSL, SSH). I
then <BR>>> ran this code, with appropriate values inserted for user and host:<BR>>><BR>>> MessageTally tallySends: [SSH runBy: user to: host port: 22].<BR>>><BR>>> It ran for a bit then crashed.<BR>>><BR>>> Rob<BR>>><BR>>> On Oct 3, 2007, at 9:59 AM, Travis Kay wrote:<BR>>><BR>>>> Can you share what you executed that crashed your image?<BR>>>> Which image and vm versions?<BR>>>><BR>>>> Travis<BR>>>><BR>>>> Robert Withers wrote:<BR>>>>> As promising as this was, it killed my image. I don't know <BR>>>>> why. Luckily, all changes are saved! I love Smalltalk!<BR>>>>><BR>>>>> Rob<BR>>>>><BR>>>>> On Oct 3, 2007, at 3:02 AM, Bert Freudenberg wrote:<BR>>>>><BR>>>>>> On Oct 3, 2007, at 3:19 ,
Lukas Renggli wrote:<BR>>>>>><BR>>>>>>>> I am looking for a class that displays the call tree of an <BR>>>>>>>> executed<BR>>>>>>>> block of code.<BR>>>>>>><BR>>>>>>> MessageTally spyOn: [ 1000 factorial ]<BR>>>>>><BR>>>>>> That is only a sampling time profiler. A call tree you get by <BR>>>>>> doing<BR>>>>>><BR>>>>>> MessageTally tallySends: [42.0 printString]<BR>>>>>><BR>>>>>> - Bert -</DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div></body></html>