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: Re: Issues using statprof (no samples taken) Date: Sun, 16 Nov 2008 13:58:57 -0500 Message-ID: <49206D71.9070407@mit.edu> References: <491DBAE5.5060100@mit.edu> <87prkx28cp.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1226862343 15852 80.91.229.12 (16 Nov 2008 19:05:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2008 19:05:43 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Nov 16 20:06:45 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 1L1mxH-0007Bx-W2 for guile-user@m.gmane.org; Sun, 16 Nov 2008 20:06:44 +0100 Original-Received: from localhost ([127.0.0.1]:36992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1mw9-0006U2-P3 for guile-user@m.gmane.org; Sun, 16 Nov 2008 14:05:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1mw5-0006Tw-Ah for guile-user@gnu.org; Sun, 16 Nov 2008 14:05:29 -0500 Original-Received: from [199.232.76.173] (port=58980 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1mw4-0006Tb-SJ for guile-user@gnu.org; Sun, 16 Nov 2008 14:05:28 -0500 Original-Received: from biscayne-one-station.mit.edu ([18.7.7.80]:62904) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1mw5-0002Sq-1p for guile-user@gnu.org; Sun, 16 Nov 2008 14:05:29 -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 mAGJ4mdY004785 for ; Sun, 16 Nov 2008 14:05:05 -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 mAGIwv5L004463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 16 Nov 2008 13:58:59 -0500 (EST) User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) In-Reply-To: <87prkx28cp.fsf@gnu.org> X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: 0.00 X-MIME-Autoconverted: from 8bit to quoted-printable by biscayne-one-station.mit.edu id mAGJ4mdY004785 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:6926 Archived-At: Ludovic Court=E8s wrote: > Beware, Guile's CVS repository is no longer used, so software in there > is essentially unmaintained. >=20 > As far as `statprof' is concerned, I would recommend using the one > available in Guile-Lib, since it's been maintained there for some time: > http://home.gna.org/guile-lib/ Thanks for that pointer! I'd seen documentation for this version of=20 statprof at http://wingolog.org/software/guile-lib/statprof/ but that=20 didn't have any links to the guile-lib download. It might be worth=20 updating=20 http://www.gnu.org/software/guile/docs/faq/guile-faq.html#Is-there-a-Sche= me-code-profiler-that-works-with-Guile_003f=20 with the new location, maybe. Unfortunately, this version still has the issue I ran into. >> I am using guile 1.6.8 on Mac OS X, installed via Macports. >=20 > Is there any particular reason why you don't use 1.8.x? Yes. As my original mail said, 1.6.8 is what gnucash is compiled=20 against and uses in this case, and I'm trying . I don't see an obvious=20 way to change that without trying to recompile gnucash with some sort of=20 modifications, which I'd rather avoid having to mess with if I can. > Can you check whether SIGPROF is actually delivered and whether > `profile-signal-handler' gets called, e.g., by adding a `(display > "foo\n")' call there? profile-signal-handler is not getting called. I do see a SIGPROF=20 delivered to the gnucash-bin process (using 'handle SIGPROF stop' in gdb=20 after attaching to the gnucash-bin process), but only once during the=20 entire report generation. I also see scm_setitimer called in gdb at a=20 point in the scheme code that matches the call to (statprof-start), and=20 I see it called again at the point that matches (statprof-stop). The=20 single SIGPROF delivered comes soon after that first setitimer call. So sounds like something is capturing the SIGPROF, I guess, so we never=20 get that first sample and never reset the profiling timer. I don't see any obvious sigaction() or signal() calls in the gnucash=20 source tree, unfortunately. Maybe they're hidden away in some sort of=20 API calls gnucash makes... Is there any way to tell in gdb which signal=20 handler is actually getting called for the signal? Or something else I=20 should grep for in the gnucash source? Thank you again, Boris