--- a/losh.lisp Mon Feb 20 15:40:36 2017 +0000
+++ b/losh.lisp Tue Feb 21 20:50:17 2017 +0000
@@ -1968,6 +1968,14 @@
(sb-sprof::stop-profiling)
(dump-profile filename))
+#+sbcl
+(defmacro profile (&body body)
+ `(progn
+ (start-profiling)
+ (unwind-protect
+ (time (progn ,@body))
+ (stop-profiling))))
+
;;;; CLOS ---------------------------------------------------------------------
(defun build-slot-definition (conc-name slot-spec)
--- a/package.lisp Mon Feb 20 15:40:36 2017 +0000
+++ b/package.lisp Tue Feb 21 20:50:17 2017 +0000
@@ -78,6 +78,7 @@
:structural-string
#+sbcl :start-profiling
#+sbcl :stop-profiling
+ #+sbcl :profile
:print-table
:print-hash-table
:print-hash-table-concisely