I'm in the need to profile a function that is "slow", i.e. it takes a very long time to terminate (if ever). It seems to me that it should be possible to profile this function nonetheless using the statistical profiler in SBCL, as it just takes samples in regular intervals. However, when I run
(sb-sprof:with-profiling (:max-samples 1000 :report :flat :loop nil)
(the-function-in-question))
the profiler just prints
Profiler sample vector full (537 traces / 10000 samples), doubling the size
but never returns with the report.
Is it even possible what I have in mind, and if so, how do I achieve it?
If the function doesn't return, the report will not be printed, obviously. What you could do to see the report is use the following sequence of operations:
(require :sb-sprof)(sb-sprof:start-profiling)(the-function-in-question)(sb-sprof:report :type :flat)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With