From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: frames / stacks / source? was Re: coverage/profiling Date: Tue, 09 Jan 2007 23:45:37 +0100 Message-ID: <45A41B11.209@xs4all.nl> References: <45A2D83D.3060700@xs4all.nl> <87wt3vhmon.fsf@ossau.uklinux.net> Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168382757 1936 80.91.229.12 (9 Jan 2007 22:45:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2007 22:45:57 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 09 23:45:55 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H4Pj9-0007if-GD for guile-devel@m.gmane.org; Tue, 09 Jan 2007 23:45:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4Pj9-0007q6-0R for guile-devel@m.gmane.org; Tue, 09 Jan 2007 17:45:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4Pj2-0007nv-Mh for guile-devel@gnu.org; Tue, 09 Jan 2007 17:45:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4Pj0-0007n1-Vn for guile-devel@gnu.org; Tue, 09 Jan 2007 17:45:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4Pj0-0007ms-LA for guile-devel@gnu.org; Tue, 09 Jan 2007 17:45:46 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H4Piz-000792-MB for guile-devel@gnu.org; Tue, 09 Jan 2007 17:45:46 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H4Piv-0005MY-H3 for guile-devel@gnu.org; Tue, 09 Jan 2007 23:45:41 +0100 Original-Received: from muurbloem.xs4all.nl ([213.84.26.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jan 2007 23:45:41 +0100 Original-Received: from hanwen by muurbloem.xs4all.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jan 2007 23:45:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: guile-devel@gnu.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: muurbloem.xs4all.nl User-Agent: Thunderbird 1.5.0.9 (X11/20061219) In-Reply-To: <87wt3vhmon.fsf@ossau.uklinux.net> X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6410 Archived-At: 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