guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: frames / stacks / source? was Re: coverage/profiling


From: Han-Wen Nienhuys
Subject: Re: frames / stacks / source? was Re: coverage/profiling
Date: Wed, 10 Jan 2007 16:43:58 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20061219)

Neil Jerram escreveu:
> Han-Wen Nienhuys <address@hidden> 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.

**
address@hidden lilypond]$ time lilypond input/example-1
GNU LilyPond 2.11.10

Hangup

real    0m2.534s
user    0m2.456s
sys     0m0.063s


address@hidden 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 - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]