X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-sprof%2Fsb-sprof.lisp;fp=contrib%2Fsb-sprof%2Fsb-sprof.lisp;h=6c3ee7cae9ca73f46075d0a6040ff9d68e1f9fb1;hb=04b902c7279d7f9e5fa75bccca2e26a002544eca;hp=1c7d1cad5edf9d9fdd21b877dd3b794cd996867b;hpb=f8664e5b8a5dfdcc6d0cb2f923b7de7a4322a1fa;p=sbcl.git diff --git a/contrib/sb-sprof/sb-sprof.lisp b/contrib/sb-sprof/sb-sprof.lisp index 1c7d1ca..6c3ee7c 100644 --- a/contrib/sb-sprof/sb-sprof.lisp +++ b/contrib/sb-sprof/sb-sprof.lisp @@ -1412,40 +1412,5 @@ functions during statistical profiling." (sb-c:%more-arg-values more-context 0 more-count))))))))) - -;;; silly examples - -(defun test-0 (n &optional (depth 0)) - (declare (optimize (debug 3))) - (when (< depth n) - (dotimes (i n) - (test-0 n (1+ depth)) - (test-0 n (1+ depth))))) - -(defun test () - (with-profiling (:reset t :max-samples 1000 :report :graph) - (test-0 7))) - -(defun consalot () - (let ((junk '())) - (loop repeat 10000 do - (push (make-array 10) junk)) - junk)) - -(defun consing-test () - ;; 0.0001 chosen so that it breaks rather reliably when sprof does not - ;; respect pseudo atomic. - (with-profiling (:reset t :sample-interval 0.0001 :report :graph :loop nil) - (let ((target (+ (get-universal-time) 15))) - (princ #\.) - (force-output) - (loop - while (< (get-universal-time) target) - do (consalot))))) - - -;;; provision (provide 'sb-sprof) - -;;; end of file