Newbie ebugger questions
DanI at wdi.disney.com
Fri Oct 30 17:41:26 UTC 1998
"John-Reed Maffeo" <rlpa80 at email.sps.mot.com> wrote...
>> What is the way to trace the execution of a 'program'. I would really
>> like to be able to watch the progression of message sends to get a
>> better idea of how things work together.
"Bolot Kerimbaev" <bolot at cc.gatech.edu> responded...
>On Oct 22, 1998 Dan Ingalls posted a note:
>A year ago I put ObjectTracer and ObjectViewer into Squeak. Less than a
>page of code with a lot of power. They let you implement exactly this kind
>of wrapper behavior if you want |to. There are no frills, but if you want
>to do this kind of tracing, they make it pretty |easy.
This can be useful for grabbing hold of an active object and tracing the messages that get set to it.
However, for tracing a program, I think Squeak's MessageTally is unbeatable. The normal spyOn: method is used for performance analysis, and presents frequently executed methods in their tree of execution.
What many people don't know is that I grafted the context-stepping simulator onto the messageTally structure, so that you can get a MessageTally tree of exact execution counts from any program fragment. Try the example
MessageTally tallySends: [3.14159 printString]
for a picture worth a thousand words.
You can run this on any program that the Context stepper can handle, which is most things other than Process switches. I ran this for 8 hours once on the Squeak interpreter itself -- it was very informative.
More information about the Squeak-dev