Scheme profiling

"ccf::satchell"@hermes.dra.hmg.gb
Tue, 23 Jun 1998 16:10:10 GMT

This is probably a bad idea, but I have just thought of a feature that I would
love to see in guile to help diagnose my bad code. What about a statistical
profiler? The technique is widely used with compiled languages; you sample
the value of the programme counter at fixed or random intervals, and build
up a statistical picture of where the programme spends most of its time.

For guile, you might say send signals at some suitable interval; the handler
would note the current source line (at least when that is meaningful), and
then execution would continue. The information obviously exists, as error
messages are nicely labeled with it. Is this possible, desirable and/or easy?

For now, a restriction to single threaded programmes would be just fine.

Julian Satchell