# HG changeset patch # User Steve Losh # Date 1545634266 18000 # Node ID 9b6480080f3849ba1e0dc96d1011c051f8ec6554 # Parent 6b2d21a74a451fd7207599bea8549e4190d28914 Add profiling modes diff -r 6b2d21a74a45 -r 9b6480080f38 src/debugging.lisp --- a/src/debugging.lisp Sun Dec 16 18:26:55 2018 -0500 +++ b/src/debugging.lisp Mon Dec 24 01:51:06 2018 -0500 @@ -192,12 +192,12 @@ (dump-profile filename)) #+sbcl -(defmacro profile (&body body) - "Profile `body` and dump the report to `lisp.prof`." +(defmacro profile (form &key (mode :cpu)) + "Profile `form` and dump the report to `lisp.prof`." `(progn - (start-profiling) + (start-profiling :mode ,mode) (unwind-protect - (time (progn ,@body)) + (time ,form) (stop-profiling))))