# HG changeset patch # User Steve Losh # Date 1470970674 0 # Node ID 63ac56a796a34ea5b8891a5cefc6ce2b75056d11 # Parent 0c5970729c2f8d293062bd004ef762d0e9438ad2 Conditional for sbcl stuff diff -r 0c5970729c2f -r 63ac56a796a3 silt.asd --- a/silt.asd Wed Aug 10 15:53:53 2016 +0000 +++ b/silt.asd Fri Aug 12 02:57:54 2016 +0000 @@ -10,7 +10,7 @@ :depends-on (#:iterate #:cl-charms #:cl-arrows - #:sb-sprof + #+sbcl #:sb-sprof #:losh #:beast) diff -r 0c5970729c2f -r 63ac56a796a3 silt.lisp --- a/silt.lisp Wed Aug 10 15:53:53 2016 +0000 +++ b/silt.lisp Fri Aug 12 02:57:54 2016 +0000 @@ -1,5 +1,5 @@ (in-package #:silt) -(require :sb-sprof) +#+sbcl (require :sb-sprof) ; (declaim (optimize (speed 3) (debug 0) (safety 0))) ; (declaim (optimize (speed 3) (debug 0) (safety 1))) @@ -946,6 +946,7 @@ ;;;; Profiling ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +#+sbcl (defun dump-profile () (with-open-file (*standard-output* "silt.prof" :direction :output @@ -956,6 +957,7 @@ (sb-sprof:report :type :flat :min-percent 0.5))) +#+sbcl (defun start-profiling () (sb-sprof::reset) (sb-sprof::profile-call-counts "SILT") @@ -965,6 +967,7 @@ :sample-interval 0.01 :threads :all)) +#+sbcl (defun stop-profiling () (sb-sprof::stop-profiling) (dump-profile))