[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

timing funcalls across gc and break



(in MCL 2.0b1p2)
I need to time funcalls, ignoring time spent in gc and time in
breaks.  I think I've figured out how to ignore break time by
handling break conditions and providing custom restarts. However,
the only way I can figure out how to ignore gc time is to use
the TIME macro, which would be awkward since it prints messages
to a stream that I'd have to parse.  Advice I could use:

 - Code for a complete RETURN-ACTUAL-RUN-TIME macro :-).
 - Any functions that get relevant GC stats.
 - Any hooks into the start or end of calls to GC.
   (Does GC acutally get called?  Can I redefine it with
   some wrapper code?  How dangerous would this be?)

Of related interest, I've noticed that MCL 2.0b1p2's TIME macro
prints the following:

(PROGN (DOTIMES (X 100) (LIST X X)) (GC)) took 205 ticks (3.417 seconds) to run.
Of that, 2 ticks (0.033 seconds) were spent in The Cooperative Multitasking Experience.
Of that, 199 ticks (3.317 seconds) was spent in GC.
 360 bytes of memory allocated.

This is rather amusing, but it leads me to wonder about a few 
other things.  I'm not too concerned about timing with perfect
accuracy over background processing, swap time, etc., but
if I DO have to parse results of the TIME macro I'd like to
know all of the things that MCL's TIME macro might print.

Any responses would be greatly appreciated! 

 Thanks!  -Lee (spector@cs.umd.edu)