更新: SBCL 1.0.24 にアップグレードすると問題が解決しました。(ただし、SLIME を 11-23-2008 リビジョンにアップグレードする必要もありました。安定した 2006-04-20 リビジョンと CVS のヘッドは、SBCL 1.0.24 では動作しないようです。)
SBCL 統計プロファイラーのドキュメントには、CPU 使用率に加えてメモリ割り当てをプロファイルできることが示されています。しかし、私の人生では、些細な Lisp 形式以上のプロファイルを作成することはできませんでした。何が起こるかの例を次に示します。
CL-USER> (require :sb-sprof)
("SB-SPROF")
CL-USER> (defun ! (n)
(if (= n 1)
1
(* n (! (- n 1)))))
!
CL-USER> (sb-sprof:with-profiling (:mode :alloc :loop nil :show-progress t :max-samples 100 :report :flat)
(dotimes (n 100)
(print n)
(! 10)))
===> 0 of 100 samples taken.
0
1
2
3
4
Profiler sample vector full (12 traces / 1000 samples), doubling the size
Profiler sample vector full (17 traces / 2000 samples), doubling the size
Profiler sample vector full (25 traces / 4000 samples), doubling the size
Profiler sample vector full (36 traces / 8000 samples), doubling the size
Profiler sample vector full (52 traces / 16000 samples), doubling the size
Profiler sample vector full (74 traces / 32000 samples), doubling the size
この時点で、通常はハングします。
誰かがこれで成功しましたか?