[squeak-dev] Re: MessageTally problems

David T. Lewis lewis at mail.msen.com
Sat Apr 24 13:08:33 UTC 2010


(CC to vm-dev list)

I added Mantis 7515 to track this issue.

http://bugs.squeak.org/view.php?id=7515
"Need way to add timer checks to #dispathFunctionPointer: without performance hit"

Dave

On Fri, Apr 23, 2010 at 11:11:29PM +0200, Brent Pinkney wrote:
> Hi Andreas,
> 
> > Look at primitiveResponse. You need to make sure that
> >
> > 	ioMSecs() > nextWakeupTick ifTrue:[self checkForInterrupts].
> 
> Ok, I have compared the 3.6-0 interp.c against the 3.10-4 interp.c (both from www.squeakvm.org).
> 
> I have made a patch to Squeak-3.10-4/platforms/unix/src/vm/interp.c to (hopefully) restore the 3.6 profiling behaviour.
> My changes are...
> 
> 
> #define DoProfilerTimerCheck 1
> 
> sqInt dispatchFunctionPointer(void * aFunctionPointer) {
> 
>         int timerPending;
>         int startTime;
> 
>         /* this is required if the MessageTally is to function correctly */
>         if (DoProfilerTimerCheck) {
>                 timerPending = foo->nextWakeupTick != 0;
>                 if (timerPending) {
>                         startTime = ioLowResMSecs();
>                 }
>         }
>         ((void (*)(void))aFunctionPointer)();
>         if (DoProfilerTimerCheck) {
>                 if (timerPending) {
>                         if ((ioLowResMSecs()) != startTime) {
>                                 if (((ioMSecs()) & MillisecondClockMask) >= foo->nextWakeupTick) {
>                                         if (foo->successFlag) {
>                                                 checkForInterrupts();
>                                         } else {
>                                                 foo->interruptCheckCounter = 0;
>                                         }
>                                 }
>                         }
>                 }
>         }
> }
> 
> 
> I would be grateful for any insight as to whether this is the correct change - it seems to profile correctly on my Kubuntu 8.04 
> box.
> 
> I am willing to pursue this change back into VMMaker once blessed.
> 
> Brent
> 
> 



More information about the Squeak-dev mailing list