[FIX][VM][UNIX] avoid calling gettimeofday() so much
Ned Konz
ned at bike-nomad.com
Wed Nov 12 20:14:07 UTC 2003
If you look at a profile of the 3.6 VM's system calls, you see that
gettimeofday() gets called a lot.
Looking into this further, I saw that ioMSecs() was getting called in some
cases when its return value was not being used.
So a simple refactoring in ioRelinquishProcessorForMicroseconds() cut down the
CPU usage on one of my systems from about 90% to about 5% under the same
conditions.
Patch is enclosed.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gettimeofday.patch
Type: text/x-diff
Size: 1019 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031112/29407a62/gettimeofday.bin
More information about the Squeak-dev
mailing list
|