Safe GC timing
"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]> Thu, 18 Jun 2026 11:21:44 +0100
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
I'm writing a macro to compute GC times (in several implementations, hence I'm only returning total time).
The guts of it for LW looks like
(let ((reset nil))
(unwind-protect
(progn
(enable-gc-timing)
(multiple-value-prog1
(values (funcall f) (getf (get-gc-timing :reset t) ':total) t)
(setf reset t)))
(unless reset
(get-gc-timing :reset t))))
Is this a safe approach? It's obviously not going to compose with anything else which wants to time the GC.
--tim
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html