unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Cc: guile-devel@gnu.org
Subject: Re: frames / stacks / source?  was Re: coverage/profiling
Date: Tue, 09 Jan 2007 23:45:37 +0100	[thread overview]
Message-ID: <45A41B11.209@xs4all.nl> (raw)
In-Reply-To: <87wt3vhmon.fsf@ossau.uklinux.net>

Neil Jerram escreveu:
>>  - 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
> performance - I genuinely don't know yet.)  The evaluator already has

I don't know, it was the first idea that came to mind. It doesn't have to be
super-fast, 10x slower is acceptable, 100x not.

> hooks (see "Evaluator trap options" in the manual) that allow you to
> call out to arbitrary Scheme code at the entry and exit of every
> frame.
> 

I'll have a look.

>> +      source = info_frame.source;
>> +      file = SCM_MEMOIZEDP (source) ? scm_source_property (source, scm_sym_filename) : SCM_BOOL_F;
>> +      line = (SCM_MEMOIZEDP (source)) ? scm_source_property (source, scm_sym_line) : SCM_BOOL_F;
> 
> Why SCM_MEMOIZEDP?  I believe non-memoized expressions have source
> properties too.

I actually don't have a clue what I'm doing ; this was a bit of cut &
paste from backtrace.c. 

> So what do you find happens with this code?

I don't get line numbers, just the memoized expressions from
the 2nd (display .. ) call.

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2007-01-09 22:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-02 18:19 coverage/profiling Han-Wen Nienhuys
2007-01-08 23:48 ` frames / stacks / source? was coverage/profiling Han-Wen Nienhuys
2007-01-09  9:10   ` Ludovic Courtès
2007-01-09 13:32     ` Han-Wen Nienhuys
2007-01-09 14:07     ` Andy Wingo
2007-01-09 22:05   ` Kevin Ryde
2007-01-09 22:15   ` Neil Jerram
2007-01-09 22:45     ` Han-Wen Nienhuys [this message]
2007-01-09 22:48     ` Han-Wen Nienhuys
2007-01-10  8:46       ` Neil Jerram
2007-01-10 12:59         ` Han-Wen Nienhuys
2007-01-10  9:16       ` Ludovic Courtès
2007-01-10 11:44         ` Han-Wen Nienhuys
2007-01-17 22:57           ` Kevin Ryde
2007-01-10 15:43     ` Han-Wen Nienhuys
2007-01-11  8:46       ` Ludovic Courtès
2007-01-11 10:19         ` Han-Wen Nienhuys
2007-01-11 15:57           ` Ludovic Courtès
2007-01-14  0:36     ` Neil Jerram
2007-01-18 23:15       ` Kevin Ryde
2007-01-27 18:12         ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A41B11.209@xs4all.nl \
    --to=hanwen@xs4all.nl \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).