From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Boris Zbarsky Newsgroups: gmane.lisp.guile.user Subject: Issues using statprof (no samples taken) Date: Fri, 14 Nov 2008 12:52:37 -0500 Message-ID: <491DBAE5.5060100@mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226685200 30552 80.91.229.12 (14 Nov 2008 17:53:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2008 17:53:20 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Nov 14 18:54:20 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L12s6-0002Mr-Nj for guile-user@m.gmane.org; Fri, 14 Nov 2008 18:54:19 +0100 Original-Received: from localhost ([127.0.0.1]:48874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L12qy-00049F-Ka for guile-user@m.gmane.org; Fri, 14 Nov 2008 12:53:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L12qu-000490-Rl for guile-user@gnu.org; Fri, 14 Nov 2008 12:53:04 -0500 Original-Received: from [199.232.76.173] (port=59173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L12qt-00048s-Ih for guile-user@gnu.org; Fri, 14 Nov 2008 12:53:03 -0500 Original-Received: from biscayne-one-station.mit.edu ([18.7.7.80]:33995) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L12qu-0002Cq-05 for guile-user@gnu.org; Fri, 14 Nov 2008 12:53:04 -0500 Original-Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id mAEHqeiR006692 for ; Fri, 14 Nov 2008 12:52:40 -0500 (EST) Original-Received: from boris-zbarskys-macbook-pro.local (dsl092-065-154.bos1.dsl.speakeasy.net [66.92.65.154]) (authenticated bits=0) (User authenticated as bzbarsky@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id mAEHqbFK025398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 14 Nov 2008 12:52:39 -0500 (EST) User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: 0.00 X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6907 Archived-At: I'm having a bit of a problem with using statprof. I checked it out from CVS (:pserver:anonymous@cvs.savannah.gnu.org:/sources/guile CVSROOT, guile/guile-statprof module). I left it in the checkout tree, and am using GUILE_LOAD_PATH to point to the files. I am using guile 1.6.8 on Mac OS X, installed via Macports. A simple test program that looks like this: (use-modules (ice-9 statprof)) (debug-enable 'debug) (trap-enable 'traps) (statprof-reset 0 500) (statprof-start) (something-to-profile) (statprof-stop) (statprof-display) works just fine when run as: env GUILE_LOAD_PATH=/path/to/statprof guile16 -s ~/test.scm and outputs profiling information. However, what I really want to profile is a gnucash report. If I add the relevant lines to the gnucash report (use-modules, debug-enable, trap-enable at toplevel, the rest around the part I actually want to profile), and run gnucash with the GUILE_LOAD_PATH set, then statprof-display errors out. It does this because statprof-sample-count is 0 (so it ends up with a divide-by-0 error). The operation I'm trying to profile in gnucash takes about 40 seconds, so sampling at 0.5ms as above should certainly be producing samples. Statprof is certainly being found, since the statprof-start calls don't error out. Any ideas as to where I should look for what's going on here and why no samples are being taken? Could it have something to do with the way guile is loaded by the gnucash binary? Or with something the binary itself is doing? Thank you in advance for any help, Boris