71b34a9a3413

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 08 Mar 2019 22:09:23 -0500
parents 782fc1421b16 (current diff) 72093637ac8b (diff)
children 5e42deadf773 28724d30efef
branches/tags (none)
files

Changes

--- a/src/debugging.lisp	Fri Mar 08 22:08:44 2019 -0500
+++ b/src/debugging.lisp	Fri Mar 08 22:09:23 2019 -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))))