From: <me...@ho...> - 2006-05-25 21:16:48
|
On Thursday 25 May 2006 15:48, Clemens Fruhwirth wrote: > At Wed, 17 May 2006 13:06:42 +0200, > > Clemens Fruhwirth wrote: > > The following patch improves the patch of my last post as > > following: > > > > * remove priority-queue from timer structure > > > > * make sb-sprof use :profile timers so timer.lisp and sb-sprof.lisp > > don't fight about the sigprof handler. > > Anyone interested in merging this? Quite interested, yes. Having the time to do it, not right now. > Anything I should change before > someone considers merging? It looks fine to me. The only doubts I have are related to sb-sprof. The timer implementation has some overhead plus the repeat support is naive: the current sb-sprof implementation leaves it to setitimer to repeat the signal, while the timer in sbcl reschedules the timer for every repetition and that involves a heap insert and a setitimer call. It's easy to see why this makes it easy to deal with for example two repeating timers with different intervals, but it should be possible to optimize some of that overhead away. As to whether that optimization should happen (assuming it's necessary) before or after merging this patch, maybe others have a more informed opinion on. > I need it for running algorithms that are > not guaranteed to halt, but every single one should get an equal tiny > slice of cpu time (about 50ms), hence :real timers are not precise > enough and I need :virtual ones. > > > [2 virtual+prof-timers.diff <application/octet-stream > > (quoted-printable)>] > > available at > http://clemens.endorphin.org/patches/virtual+prof-timers.diff Cheers, Gabor |