Method execution monitoring

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Method execution monitoring

Petteri
Hi all,

I'm looking for a smalltalk environment for implementing a performance
profiling tool. To do this I would need to add some data collection
code to the method execution interface, so that the tool would work
for with any objects. Do you know if I would be able to do this with
the Dolphin Smalltalk?

Many thanks,
Petteri Kaskenpalo
AUT, Auckland, New Zealand


Reply | Threaded
Open this post in threaded view
|

Re: Method execution monitoring

Chris Uppal-3
Petteri wrote:

> I'm looking for a smalltalk environment for implementing a performance
> profiling tool. To do this I would need to add some data collection
> code to the method execution interface, so that the tool would work
> for with any objects. Do you know if I would be able to do this with
> the Dolphin Smalltalk?

It seems to me that there are at least three ways you could approach this:

You could use a modified VM that included instrumentation.  That's something
that you'll only get with cooperation from OA -- and presumably that'd cost
money if they were willing to consider it at all (I have no idea).  You might
find that Squeak or GNUSt was a better starting point if you want to take this
approach.

You could use method re-writing after the style of John Brant's "Method
Wrappers" (see
    http://st-www.cs.uiuc.edu/users/brant/Applications/WrapperApplications.html
of which there seems to be a Dolphin port by Andres Otaduy at:
    <http://www.smalltalking.net/Goodies/Dolphin/>

You could use a polling approach, and sample the stack at intervals.  That is
how Ian Bartholemew's profiler for Dolphin works, for example.  You can find
Ian's profiler at:
    <http://www.idb.me.uk/goodies5/profiler.html>

     -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Method execution monitoring

Petteri
Hi Chris,

Thanks for your suggestions. I'll study all of the options further,
but looks like the VM instrumentation with Squeak might be the most
flexible option.

Many thanks,
Petteri


Reply | Threaded
Open this post in threaded view
|

Re: Method execution monitoring

Ian Bartholomew-19
Petteri,

> Thanks for your suggestions. I'll study all of the options further,
> but looks like the VM instrumentation with Squeak might be the most
> flexible option.

It will also be the best way performance wise.  I once, for some long
forgotton reason, implemented a logger that used Dolphin's single step
mechanism to trace the exact execution path of a process and store each step
in a collection.  I seem to recall that I got it to work but it, not
unsurprisingly, was very slow and impractical for anything other than a
short trace.

FWIW, back in the early Dolphin days (I'm talking about the betas and D1)
David Jones, one of the original implementation team, wrote a profiler
called Svengali that  was able to track message sends and displayed them in
a graphical format.  I did, with David's OK, update it for a couple of
Dolphin versions but gave up when the number of changes needed became too
great.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.