X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-sprof%2Fsb-sprof.lisp;h=6c3ee7cae9ca73f46075d0a6040ff9d68e1f9fb1;hb=920b5eb02b1e1fd1c6c28395cade04e81fbee2bb;hp=765ded9733eed7dfecf8bd54269bbdde3c6823b4;hpb=1e5296127f5b384a2171646747021ebeee73b801;p=sbcl.git diff --git a/contrib/sb-sprof/sb-sprof.lisp b/contrib/sb-sprof/sb-sprof.lisp index 765ded9..6c3ee7c 100644 --- a/contrib/sb-sprof/sb-sprof.lisp +++ b/contrib/sb-sprof/sb-sprof.lisp @@ -657,7 +657,7 @@ profiling, and :TIME for wallclock profiling.") loop around the BODY until a sufficient number of samples has been collected. Returns the values from the last evaluation of BODY. -In multi-threaded operation, only the thread in which WITH-PROFILING was +In multithreaded operation, only the thread in which WITH-PROFILING was evaluated will be profiled by default. If you want to profile multiple threads, invoke the profiler with START-PROFILING. @@ -704,7 +704,7 @@ The following keyword args are recognized: of this. In this case using :MODE :TIME is likely to work better. :LOOP - If false (the default), evaluete BODY only once. If true repeatedly + If false (the default), evaluate BODY only once. If true repeatedly evaluate BODY." (declare (type report-type report)) (check-type loop boolean) @@ -1409,41 +1409,8 @@ functions during statistical profiling." (incf (the (unsigned-byte 59) (car info))) (multiple-value-call original-fun - (sb-c:%more-arg-values more-context more-count))))))))) - + (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