Best way to monitor/debug time critical process

Dean_Swan at Mitel.COM Dean_Swan at Mitel.COM
Mon Aug 16 22:09:19 UTC 2004


Hi Brad,

A fairly generic answer would be "instrument the code".  Obviously the 
debugger isn't going to work.  Single stepping is way too slow, so you 
have to insert "debug" code in the code you're trying to debug that will 
cause some kind of evidence of what's going on in the code of interest to 
be visible, hopefully without disturbing the timing of the time critical 
code in any significant way.  Heisenberg applies though.

I often create "logs" in memory by "logging" values that I'm monitoring 
into some kind of RAM based storage that I can inspect later.  The idea is 
that you'd like to just print things to the transcript at different points 
in the code and scan through the printout, but printing to the transcript 
is too "expensive" in terms of run time.

I have to do this kind of thing a lot (for C/C++ based code running on 
VxWorks) for my day job.  Breakpoints and single stepping are useless for 
trying to debug audio quality problems in multichannel Voice over IP 
systems.  I think the same technique could work for Smalltalk.  You just 
need to do things like preallocate the log storage, write directly into 
memory(i.e. 'DebugLog at: currentIndex put: someValue'  at:put: is a 
primitive for byte and word arrays), etc. to minimize the runtime of the 
debug code.

Does this help?

                                -Dean






"Brad Fuller" <bradallenfuller at yahoo.com>
Sent by: squeak-dev-bounces at lists.squeakfoundation.org
08/16/04 04:00 PM
Please respond to The general-purpose Squeak developers list

 
        To:     "'The general-purpose Squeak developers list'" 
<squeak-dev at lists.squeakfoundation.org>
        cc: 
        Subject:        Best way to monitor/debug time critical process


What is the best, or best ways, to monitor and debug a Process that is 
time
critical?

brad





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040816/f4a682e2/attachment.htm


More information about the Squeak-dev mailing list