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