RV: Instrumenting Send and what is StrikeFontSet>displayString:on:from:to:at:kern:baselineY: doing?

David T. Lewis lewis at mail.msen.com
Wed Nov 2 22:46:05 UTC 2005

On Sun, Oct 30, 2005 at 10:44:24AM -0800, John M McIntosh wrote:
>On 30-Oct-05, at 10:21 AM, David T. Lewis wrote:
>> Here's one additional suggestion. Rather than dedicating SIGUSR1
>> and SIGUSR2 to this specific function, you can select what signals
>> to use from the image, and also handle the signals in the image.
> David the change set is on
> ftp://ftp.smalltalkconsulting.com/experimental/JMMRecordMsgSends. 
> 1.cs.zip
> If you want to change the logic to invoke what you suggest please do  
> and send me the change set. Having a working example for the Unix VM  
> would be a good thing.

Hi John,

Here are the changes to move the SIGUSR1 and SIGUSR2 signal handlers
out of the VM and into the image. Class VMStatsTraceControl implements
the signal handlers, which are activated at image startup and
deactivated at image shutdown.

Along the way I fixed a bug in #primitiveSetVMStatsTraceMessageSendLevels
that was causing my VM to crash when the stats log file was closed
then reopened.

I have to mention that I have seen a nasty problem that I don't
understand. On two different occasions while I was writing and
debugging this, I ended up the stats trace log data being written
to my changes file (with horrible results, needless to say). I do
not know what the cause was, I don't know how to reproduce it, and
I don't know if it's related to the signal handling or something
else in the interpreter changes. In any case, be on the lookout
for this bug, and save your image rather more often than you
might otherwise do.

Other than that, it's rock solid ;)


>From the change set preambles:


Add VMStatsTraceControl to provide the signal handlers for SIGUSR1 and
SIGUSR1 controlling VM stats log. Sending a SIGUSR1 signal to the Squeak
process increments the logging level, and SIGUSR2 disables logging and
closes the file.

Requires OSProcess for the signal handling (but relevant methods can be
copied into VMStatsTraceControl if you don't want to require OSP). The
signal handling primitive is in OSPP, currently distributed with the
Unix VM, or load OSProcessPlugin from SqueakMap.


Interpreter changes to accompany VMStatsTraceControl-dtl. This removes
the SIGUSR1 and SIGUSR2 signal handlers from the interpreter so they
can be handled in the image.

Load this after JMMRecordMsgSends and JMMRecordMsgSendInterface.
Also load VMStatsTraceControl-dtl.

Interpreter changes:
- Removed #cCode: (interrupt handlers) from Interpreter>>initVmStatsTraceMessageSendLevels.
- Added Add Interpreter>>primitiveGetVMStatsTraceMessageSendLevels.
- Added SystemDictionary>>getVMStatsTraceMessageSendLevels
- Fixed assignment bug in Interpreter>>primitiveSetVMStatsTraceMessageSendLevels (change '=' to ':=').

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VMStatsTraceControl-dtl.cs.gz
Type: application/x-gunzip
Size: 1284 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051102/3a4bf596/VMStatsTraceControl-dtl.cs.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VMStatsInterpreterChanges-dtl.cs.gz
Type: application/x-gunzip
Size: 886 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051102/3a4bf596/VMStatsInterpreterChanges-dtl.cs.bin

More information about the Squeak-dev mailing list