primitiveMillisecondClock usage (lots but why?)
John M McIntosh
johnmci at smalltalkconsulting.com
Mon Jun 30 06:46:40 UTC 2003
Oh, and the other interesting issue is that we seem to call the
microsecond clock primitive a lot when
Squeak is just idle doing nothing... Say 6,186 times over 13.43
seconds.
Another 1913 system calls are split between other locations in the Vm
to support checkForInterrupts(626), primitiveResponse(633) &
ioRelinquishProcessorForMicroSeconds(618) and 40 to the statistical
counters in the IGC.
Calculating out those 626 values points to the usage of the mac os-x vm
lowres clock which triggers a high resolution lookup every 16+ms, and
the IGC uses the high res clock to generate statistical data. Those
I"m not concerned these about because they are expected as part of
running the VM.
The ioRelinquishProcessorForMicroSeconds call every 20ish ms is
interesting because it fits into expectations of the morphic world
targeting a 50ish frame per second update rate? Hint should that not be
60 frames a second! Hint that is a bug .
I will note the macintosh os-x vm uses a pthread based timer thread to
manage the low resoution ms clock which is used by primitiveResponse.
Otherwise the syscall count would be *way* higher. I also then avoid
itimer signal interrupts which can affect syscalls. Other unix
implementations might note this as viable alternative to timer signals.
mmm so somehow squeak when idle is looking at the millisecond clock 460
times a second. That's a lot of clock looking... when things are
'idle'.... Yes it's cheap, still why so much clock looking?
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|