From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Issues using statprof (no samples taken) Date: Mon, 17 Nov 2008 16:10:12 +0100 Message-ID: <87bpwecrsb.fsf@gnu.org> References: <491DBAE5.5060100@mit.edu> <87prkx28cp.fsf@gnu.org> <49206D71.9070407@mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226934668 18795 80.91.229.12 (17 Nov 2008 15:11:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 15:11:08 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Nov 17 16:12:11 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 1L25ln-0000ZP-7J for guile-user@m.gmane.org; Mon, 17 Nov 2008 16:12:07 +0100 Original-Received: from localhost ([127.0.0.1]:58381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L25ke-0000wr-Mg for guile-user@m.gmane.org; Mon, 17 Nov 2008 10:10:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L25kA-0000UE-S3 for guile-user@gnu.org; Mon, 17 Nov 2008 10:10:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L25k8-0000Sd-UQ for guile-user@gnu.org; Mon, 17 Nov 2008 10:10:26 -0500 Original-Received: from [199.232.76.173] (port=54829 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L25k8-0000SK-Ep for guile-user@gnu.org; Mon, 17 Nov 2008 10:10:24 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:59993 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L25k7-0003I0-Uy for guile-user@gnu.org; Mon, 17 Nov 2008 10:10:24 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L25k6-00015c-Gs for guile-user@gnu.org; Mon, 17 Nov 2008 15:10:22 +0000 Original-Received: from 195.83.213.140 ([195.83.213.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 15:10:22 +0000 Original-Received: from ludo by 195.83.213.140 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Nov 2008 15:10:22 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.83.213.140 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Brumaire an 217 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) Cancel-Lock: sha1:VIEYuQAKrxIsgTXXtR3fsBaTsI4= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:6931 Archived-At: Hi, Boris Zbarsky writes: > profile-signal-handler is not getting called. I do see a SIGPROF > delivered to the gnucash-bin process (using 'handle SIGPROF stop' in > gdb after attaching to the gnucash-bin process), but only once during > the entire report generation. I also see scm_setitimer called in gdb > at a point in the scheme code that matches the call to > (statprof-start), and I see it called again at the point that matches > (statprof-stop). The single SIGPROF delivered comes soon after that > first setitimer call. GDB supposedly shows all SIGPROFs that are raised, so if it shows only one, then something's wrong. Can you check the arguments passed to `setitimer(2)' to make sure it makes sense? Perhaps you could also try increasing the sampling frequency, although that's arguably not required. Another (remote) possibility could be that the Scheme-level handler is not called, even though the C handler in libguile is called, since Scheme-level signal handlers are actually asyncs (info "(guile) Asyncs"). You can try to force the execution of asyncs by adding a call like "(select '() '() '() 0)" (technically, it invokes `SCM_TICK', which runs asyncs). One last thing would be to check whether `HAVE_SIGACTION' is defined in Guile's on your platform, to see which version of `scm_sigaction_for_thread ()' is used. Thanks, Ludo'.