Neil Jerram escreveu: > Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > >> Since noone responded, I decided to take a look myself. >> My overall idea was to do the following: >> >> - at the top of deval(), find out current source file and line > > OK, but with the code where you have it at the moment, you'll miss > tail-recursive calls. > >> - invoke some kind of callback that increments a counter for the >> source location >> >> - produce pretty pretty coverage graphs with the contents of the hash >> >> The last two steps are trivial, but I'm getting lost with the first >> step. >> >> I tried to follow what happens when an error backtrace is generated. >> My try is below. Unfortunately, I can't find much documentation on how >> frames/stacks/etc. interact. Can anyone gently nudge me in the right >> direction? > > Do you think you need to do this in C? (You might do, for reasonable
Unfortunately, this is way too slow. ** [EMAIL PROTECTED] lilypond]$ time lilypond input/example-1 GNU LilyPond 2.11.10 Hangup real 0m2.534s user 0m2.456s sys 0m0.063s [EMAIL PROTECTED] lilypond]$ time lilypond -dcoverage input/example-1 GNU LilyPond 2.11.10 Hangup real 1m22.184s user 1m19.808s sys 0m0.235s ** Perhaps the better option is to somehow instrument the code such that memoization of an expression records the coverage. Then we won't get execution counts, but it should be almost as fast as normal running. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel