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: Tue, 18 Nov 2008 11:30:41 +0100 Message-ID: <87wsf1iawe.fsf@gnu.org> References: <491DBAE5.5060100@mit.edu> <87prkx28cp.fsf@gnu.org> <49206D71.9070407@mit.edu> <87bpwecrsb.fsf@gnu.org> <49218F97.2000805@mit.edu> <87abbybatj.fsf@gnu.org> <4921E796.6000408@mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1227004527 26728 80.91.229.12 (18 Nov 2008 10:35:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2008 10:35:27 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 18 11:36:28 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 1L2NwX-0007gk-Mf for guile-user@m.gmane.org; Tue, 18 Nov 2008 11:36:25 +0100 Original-Received: from localhost ([127.0.0.1]:42549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2NvP-0004Jv-5n for guile-user@m.gmane.org; Tue, 18 Nov 2008 05:35:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2NvG-0004Io-NU for guile-user@gnu.org; Tue, 18 Nov 2008 05:35:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2NvF-0004IG-VJ for guile-user@gnu.org; Tue, 18 Nov 2008 05:35:06 -0500 Original-Received: from [199.232.76.173] (port=43944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2NvF-0004I6-JD for guile-user@gnu.org; Tue, 18 Nov 2008 05:35:05 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:58197 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 1L2NvE-0001wm-VX for guile-user@gnu.org; Tue, 18 Nov 2008 05:35:05 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1L2NvC-0007ZI-HA for guile-user@gnu.org; Tue, 18 Nov 2008 10:35:02 +0000 Original-Received: from dhcpr-239.futurs.inria.fr ([195.83.212.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2008 10:35:02 +0000 Original-Received: from ludo by dhcpr-239.futurs.inria.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Nov 2008 10:35:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dhcpr-239.futurs.inria.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 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:Xn/TfPob51qIIdHeMl3bz10poBM= 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:6937 Archived-At: Hi, Boris Zbarsky writes: > Ludovic Courtès wrote: >> Maybe with `strace(1)' or similar? > > Unfortunately, that just shows the pointer to the struct, not the > value in the struct itself.... Under GNU/Linux it does the right thing. :-) > I tried adding that call to code that certainly runs repeatedly > between statprof-start and statprof-stop (the code that handles > updating the gnucash progress bar, in fact), but that doesn't seem to > help. Are you sure that piece of code is ever called? Is it called from an "idle" handler or some such? Another idea is that you could try modifying `statprof' so that it uses (setitimer ITIMER_REAL ...) and (sigaction SIGALRM profile-signal-handler) just to see if it makes a difference... > I'm not sure. It does update the UI during execution of guile code > (progress indicator, and so forth), but that could also be > accomplished if the guile interpreter makes some sort of periodic > callbacks into the embedding. They link to pthread, but don't seem to > really use it for anything... It may be that they use a single pthread (the "main" thread), and that they handle events and timeouts via a GTK+ even loop. Can you check with GDB whether `pthread_create(3)' is ever called? > Yeah, that's called for SIGPROF in this case. But the scheme handler > is still not called, even with the (select '() '() '() 0) calls as > above. That's weird, but I don't have any other idea. Now, I'm thinking about how 1.8 works, so it might be that there are subtle differences with 1.6. Thanks, Ludo'.