Is there a message profiler in Squeak?
Robert Withers
reefedjib at yahoo.com
Thu Oct 4 01:20:33 UTC 2007
I looked at that method (#step) and called methods and I sort of see
how they interprets bytecodes. Are you saying there is no way to
call a primitive in the vm from this interpreted code in the image?
How about a bytecode function? I have intentions of being able to
do this for my research. I need to be able to execute a bytecode
function in the vm with the receiver and args and a bytecode
specifying which function to call. What would it take to allow
this? How about a primitive?
thanks,
Rob
On Oct 3, 2007, at 3:05 PM, Bert Freudenberg wrote:
> This has not that much to do with the InterpreterSimulator -
> although it is indeed yet another bytecode interpreter interpreter
> (see ContextPart>>step)
>
> - Bert -
>
>
> On Oct 3, 2007, at 23:17 , Rob Withers wrote:
>
>> 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.
>>
>> Rob
>>
>> ----- Original Message ----
>> From: Bert Freudenberg <bert at freudenbergs.de>
>> To: The general-purpose Squeak developers list <squeak-
>> dev at lists.squeakfoundation.org>
>> Sent: Wednesday, October 3, 2007 1:14:09 PM
>> Subject: Re: Is there a message profiler in Squeak?
>>
>> #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
|